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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yesterday, day before yesterday

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How to get these dates in yyyy/mm/dd format in a Korn shell program?
Thanks
 
Use date +%Y/%m/%d

To store in a shell variable use VARNAME=`date +%Y/%m/%d`

For more info on the date formatting options, do a man strftime

Greg.
 
Sorry .. that doesn't really answer your question! Search this forum for "previous date" and you'll find plenty of advice.

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top