Gawk trying to get time in milisec start and end of program. 1st "echo %time%" | getline startT, works like a charm. 2nd "echo %time%" | getline stopT, yeilds NADA. for some reason the second %time% does not work. ......any ideas? Thanks, Joe
Asked
Active
Viewed 34 times
-1
-
Post a [mcve] so we can try to help you (chances are you're not closing the pipe between invocations but without seeing the full code...). – Ed Morton Apr 12 '16 at 00:43
1 Answers
0
example BEGIN{ "echo %time%" | getline t1 "echo %time%" | getline t2
print "t1="t1" t2="t2
}
This yeilds t1= 9:36:12.60 t2=
using gawk windows environment
for now I'm using system("echo %time% > starttime.txt") getline P_start < "starttime.txt"

joseph T
- 1
- 1