I want to take time difference of two time stamp but getting an error while passing timestamp variable from shell toawk
.
Shell code:
FTIMESTAMP="2015-07-01 12:30:50"
gawk -v FTIMESTAMP=$FTIMESTAMP -v DSECONDS=$DSECONDS -f test.awk /home/abc/TShift.csv
Error is:
gawk: 12:30:50
gawk: ^ syntax error
Escaping character is also not working FTIMESTAMP="2015-07-01 12\:30\:50"
.
I have another timestamp in awk
and want to take time difference between them.