How do I search and replace date in vi without affecting other numbers? -


There was a date 4th colum in this date. I want to search for every date which is a prefix with 2014 and it changes with 2013. I do not want to change the numbers in any other column, where 2014 can also be seen I have trouble using the wildcard, can someone please tell me the vi command to give me such a command? Thank you very much

20140009,20140009, GSM-AHS, 20101218132823, 46767807490,5302833, IA, D, Post ,, N 20140009,20140009, GSM-AHS, 20140119000900 ,, 46767807490,5302833, IA, D, Post, N, N 2014001,2014001 GSM-AHS, 20131012212112, 46730360076,3922720, H, I, East ,, N 2014001,2014001 GSM-AHS, 20140119000900, 46730360076,3922720, H, I, East, N , N 2014001,2014001 GSM-AHS, 20140615210515, 46730360076,3922720, H, I, East, N, N 2014001,2014001 GSM-AHS, 20140617213108, 46730360076,3922720, H, I, East, N, N 2014, 2014001 GSM-AHS, 20140627150239, 46730360076,3922720, H, I, East, N, N 2014001,2014001 GSM-AHS, 201 40705085247, 46730360076,3922720, H, I, East, N, N 2014001,2014001 GSM-AHS, 20140729075246, 46730360076,3922720, H, I, East, N, N 20140012,20140012, GSM-AHS, 20101221165213,13 , 46767674084,1, RO, O, East ,, N, 20,140,012, 20140012, GSM-AHS, 20130113025426, 46767674084,1, RO, O, East, N, N 20140016,20140016, GSM-AHS, 20130728205747,20145,46767674542 , 5493416, OU, D, Post, N 20140016,20140016, GSM-AHS, 20140518005550, 46767674542,5493416, OU, D, Post, N, N 20140017,20140017, GS M AHS, 20131230033641, 46767807730,7810638, 08, D, Post, N, N 20140020,20140020, GSM-AHS, 20140518005550, 46767817323,1090680, OT, D, Post, N, N V>

If all your 3 columns GSM-AHS, you can try

 :.% S / GSM-AHS 2014 / GSM-AHS 2013   

which will replace only the first match, do not touch the rest

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -