1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg. Consider week from Jul 18 2011 To Jul 24 2011
Here I would like to search for date pattern as "Jul 18", "Jul 19","Jul 20" so on & replace it with "Jul 18 2011" type pattern.
Ok, you do not have GNU date and you have two patterns in your input file. You want that there is only one pattern.
Mon Jul 18 00:32:52 EDT 2011,NULL,UAT # changes to Jul 18 2011,NULL,UAT
Jul 19 2011,NULL,UAT # not changes
Yes?
---------- Post updated at 11:53 AM ---------- Previous update was at 11:49 AM ----------
You don't need and date command if I'm right about pattern but it's just a habit (maybe bad one) to ask about it any time when I see questions about date manipulations.