Hi,
I'm using awk in HP-UX machine which does not support systime(), strftime(). So to get the date time I was using :
seq 1 100000 | awk ' "date +%Y%m%d%H%M%s" | getline curtime; print curtime }'
However the above code gets the date only once, next time it is not updated. For example if I clear the curtime, like :
seq 1 100000 | awk ' "date +%Y%m%d%H%M%s" | getline curtime; print curtime; curtime = "" }'
It'll print the date only once and blanks for other lines.
Is there any way I can get the current date time for everyline?