Search Results

Search: Posts Made By: ahamed101
20,556
Posted By ahamed101
Instead of systime() use strftime("%s") and give...
Instead of systime() use strftime("%s") and give it a try!


awk -F"|" '{ x=$1;y=$2;
diff=strftime("%s")-mktime(substr(x,0,4)OFS substr(x,5,2)OFS substr(x,7,2)OFS substr(y,0,2)OFS...
20,556
Posted By ahamed101
Try with nawk in that case --ahamed
Try with nawk in that case

--ahamed
20,556
Posted By ahamed101
See if you have gawk installed. --ahamed
See if you have gawk installed.

--ahamed
20,556
Posted By ahamed101
Using awk cat infile 20111220|102000 ...
Using awk


cat infile
20111220|102000



awk -F"|" '{ x=$1;y=$2;
diff=systime()-mktime(substr(x,0,4)OFS substr(x,5,2)OFS substr(x,7,2)OFS substr(y,0,2)OFS substr(y,3,2)" 00")
print...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 11:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy