I have a csv file with the following contents:
INTERB-MNT,2008-09-10T21:05:38Z,2008-09-10T21:05:38Z,MARIA
How can I use sed
to replace the characters 'T'
and 'Z'
, such that the contents of the file are changed to the following?:
INTERB-MNT,2008-09-10,21:05:38,UTC,2008-09-10,21:05:38,UTC,MARIA
I tried the following, but obviously I'm missing something because that does not produce the desired results:
sed -e 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.T.[0-9]{2}:[0-9]{2}:[0-9]{2}Z/[0-9]{4}-[0-9]{2}-[0-9]{2},[0-9]{2}:[0-9]{2}:[0-9]{2}UTC/g'