Sometimes I need the previous date in my scripts:
DATE=$(date +%Y%m%d --date=-1day)
For 10/5/2011 DATE = 20111004
$ date --version
date (GNU coreutils) 6.10
Wednesday, October 5, 2011
Subscribe to:
Post Comments (Atom)
My digital hodgepodge
No comments:
Post a Comment