3
CONTEXT: I have a CSV file from which I want to extract and process some columns. I realized that AWK would be the perfect tool for this and everything was fine until I had to deal with timestamps - for example 2008-07-31T21:42:52.667
PROBLEM 1: I need to calculate the amount of days that have passed between a base date (say 2008-07-31) and all the timestamps in the first column of the input file.
DETAIL: I know I can do difference operations in case I can use the command date of BASH, because with the following command I get the amount of seconds passed since the base date of the date system:
date -d"2008-07-31" +%s #RESULTADO: 1217473200s
This way my problem can be reduced to the following:
PROBLEM 2: How to execute a bash command from within AWK?