BreadCrumbs: Date
Date
From Luke Jackson
(Difference between revisions)
Revision as of 05:07, 18 November 2020 (edit) Ljackson (Talk | contribs) ← Previous diff |
Current revision (05:07, 18 November 2020) (edit) Ljackson (Talk | contribs) |
Current revision
[edit]
Echo date values current, past, future based on SYSTIME
date --date='5 minutes ago' date --date='24 hours ago' date --date='24 hours ago' '+%b %d %T' date --date='1 day ago' '+%b %d %T'
date -d '-1 day' '+%b %d %T' date -d '-1 day' '+%b' date -d '-24h' '+%b' date -d '-24 h' '+%b' date -d '-24 hours' '+%b'
[edit]
Convert 3 Char month text to integer
echo "Jan" | awk 'BEGIN{months=" JanFebMarAprMayJunJulAugSepOctNovDec"}{print index(months,$0)/3}'