Re: date command two days from now
- From: Uncle Steve <steve.stamper@xxxxxxxxxxxx>
- Date: Wed, 24 Jan 2007 07:30:35 -0500
As much as I love Perl, I have a cool little date trick for you...
NEXTDATE=$(TZ=CST-42CDT date +%Y%m%d)
1. Echo your $TZ - in my case I got CST6CDT
2. Subtract (subtract for forward, add for backward) 48 from your timezone
offset
3. Adjust as needed.
Steve
Enrique Sanchez
Vela To: aix-l@xxxxxxxxxxxxx
<esanchezvela@YAH cc:
OO.COM> Subject: Re: date command two days from now
Sent by: IBM AIX
Discussion List
<aix-l@Princeton.
EDU>
01/23/2007 06:52
PM
Please respond to
IBM AIX
Discussion List
I would use perl,
perl -e ' $string=localtime( time()+48*3600),print
"$string \n"'
Thu Jan 25 18:52:05 2007
regards,
esv.
--- Andrew.Townsend@xxxxxxxxx wrote:
Is there a way to get the date from say two days
from now or two hours from
now for scripting purposes?
I mean like:
date +"%d %h %y" gives you 23 Jan 07
But I want
23 Jan 07
Or instead of "Tuesday" I'm looking for "Thursday".
Any ideas?
Thanks,
Enrique Sanchez Vela
email: esanchezvela@xxxxxxxxx
--------------------------------------
http://www.savetheinternet.com/
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
- Follow-Ups:
- Re: date command two days from now
- From: Andrew . Townsend
- Re: date command two days from now
- From: Zoltán Vad
- Re: date command two days from now
- References:
- Re: date command two days from now
- From: Enrique Sanchez Vela
- Re: date command two days from now
- Prev by Date: Re: complilation error
- Next by Date: Re: date command two days from now
- Previous by thread: Re: date command two days from now
- Next by thread: Re: date command two days from now
- Index(es):
Relevant Pages
|
|