Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date +%b = Aug, how get one month before, eg. Jul 1

Status
Not open for further replies.

gargamel100

Technical User
Joined
Oct 25, 2006
Messages
31
Location
CZ
Hi all,

date +%b produce
Aug

what to do to with "date" to get one month before, in this case Jul

thanks in advance
 
Hi

Code:
[blue]master #[/blue] date +%b
Aug

[blue]master #[/blue] date -d '-1 month' +%b
Jul

[blue]master #[/blue] date --version
date (GNU coreutils) 6.9

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top