The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Search Results
Showing results 1 to 2 of 2
Search took
0.00
seconds.
Search:
Posts Made By:
vgersh99
Forum:
HP-UX
12-25-2018
20
awk command in hp UNIX subtract 30 days automatically from current date without date illegal option
13,234
Posted By
vgersh99
Oh, I didn't know that. Then another...
Oh, I didn't know that.
Then another alternative with awk:
echo '2012-07-26 15:00:00' | awk -F'[- :]' '{srand();now=srand(); timeE= $2*2629743 + $3*86400 + ($1-1970)*31556926 +$4*3600 +$5*60+$6;...
Forum:
HP-UX
12-24-2018
20
awk command in hp UNIX subtract 30 days automatically from current date without date illegal option
13,234
Posted By
vgersh99
well... you can convert everything to epoch and...
well... you can convert everything to epoch and do math with epoch.
E.g. as a starter...
echo '2012-07-26 15:00:00' | awk -F'[- :]' -v now="$(date +%s)" '{timeE= $2*2629743 + $3*86400 +...
Showing results 1 to 2 of 2
Member Badges and Information Modal
×