I am trying to parse a log file that starts with a formatted date column: 06/22/2015 00:17:59
I use the following code to convert it to a unix timestamp:
unix="date -d\""$1" "$2"\" \"+%s\""; unix | getline timestamp;
However, when I do this, awk fails with the following error:
awk: (FILENAME=/dev/fd/63 FNR=263350) fatal: cannot open pipe 'date -d"06/22/2015 00:17:59" "+%s"' (Too many open files)
Any way to handle this or parse the date differently?
source share