I have list of dates in a file. Am reading each line and trying to format date, Can you please help me ?
Sample file content:
02/22/16 USA is great country
02/21/16 USA future
02/23/16 who is he
I want to read each line from above file and format date as below
2016-02-21
(i.e., using the date
utility format +%Y-%m-%d
)
Can you please help me? Appreciate your help