Forum Moderators: bakedjake
I've got a text file which contains a date/time stamp on each line in this format:-
2008-08-01 09:42:55
I need to change every line (about 6,000 lines) so that the datetime is in the format:-
01.08.08 (09:42)
Is there a little Linux util I can use to help me automate that?
I don't mind writing a script if I have to, but if I can avoid doing that even better.
Thanks!
perl -i.bak -pe "s/\d\d(\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):\d\d/$3.$2.$1 ($4:$5)/g" dates.txt