Quote:
Originally Posted by
ahamed101
I feel something is wrong with the logic?
Output of awk inside the while will give you more than one value(of course it depends on the file) and which value will you chose to replace using sed and with what?
regards,
Ahamed
Ok yeh i just realised that this wont work, I was testing with files that only had Date: blah blah in them but normally they will have other data as well which will stil get caught up. Thanks for the heads up.
Any idea of a better way to do this?
The whole goal of this is that I have a line in multiple files with:
Date: Thu, Aug 23 2001 21:27:04 -0400
As an example. What im trying to do is determine if a file has a date format of month day year and then swap them around so it would be instead:
Date: Thu, 23 Aug 2001 21:27:04 -0400
So just simply swapping the two columns around for files that have the wrong date format.