Tuesday, April 26, 2011

Get the previous date in month-dd-yyyy formation in unix

Another nifty command in Bash to do so in the required format of month-dd-yyyy

date -d 'yesterday' +%B-%d-%G

Other Formats are mentioned at http://unixhelp.ed.ac.uk/CGI/man-cgi?date

No comments: