Are there any GAWK/TCSH guru's about that can give me a hand with this?
Imagine an ASCII format file with 5 columns of data:
I'm trying to change the date format in the last column such that 10-Aug-2015 is represented as 20150810. On a TCSH command line, I can do this by using the date command as follows:
date -d "10-Aug-2015" +%Y%m%d
The problem is I have several hundred files and each can have up to 100,000 lines. Thus, I need a mechanism to parse column 5 through the date command, such that each instance of the date is formatted as described. I only have the TCSH and GAWK (at a push SED) tools available to solve this, so my plan was to write a TCSH script referencing GAWK to do this.
I have tried piping the date command through a gawk print statement, but I can't quite work out how to read $5 into the date command. I'd had a look on several UNIX sites, but have yet to find a solution.
Can anyone help?