How do I update the dates (by 30 days) in the files going to that specific location in unix? Can awk or sed help ?
File format is as below -
Thomson: xyz
Format: 1
Character_set: ASCII8
File_type: event_file
File_subtype: mobile_call
File_group_number: 1
File_in_group_number: 1
Total_files_in_group: 19
Source_ID: source
Tag: tag -v13
This file produced by GTFplaintext 0.1:
Event: "61765","1","2014/01/03-13-00-00.00",,"GBP",,,,,,,,,,"61765","0345351816","1407",,,,,,,,,,,,,,,,,,,,,
Footer: text_data_transfer_file
AuditValue_1: 1
AuditValue_2: 0
End: text_data_transfer_file
Lines: 15
Characters: 351
Checksum:
Security_checksum:
End_of_file:
In the above file I need to go to the line starting with 'Event:' and update the date
"2014/01/03-13-00-00.00" by 30 days (only date needs to be updated, while time can remain same).
There are 20k such files in a directory, for which the dates have to be updated.
TZ=America/Sao_Paulo date -d '2012-10-21T00:00'