Hi,
I'm having two fields in the file
F1|F2
20111220|102000
F1 ->YYYYMMDD
F2 ->HHMMSS
Now, I need to compare this with current date & time and need to return the difference value in hours. Already, I checked with datecalc from the forum. So, need hints from Shell Gurus.
strftime, systime and mktime are getting the same errors in AIX. We don't have C/C++ compilers on these servers. I don't know how to call these system calls.
ddiff -i '%Y%m%d|%H%M%S' "20111220|102000" now -f '%H'
=> 3003
The -i is the input format, -f the output format (difference in hours), and "20111220|102000" is your F1|F2, now is the value to compute the difference from.