Re: Obtain the date of three days ago

From: Bill Marcum (bmarcum_at_iglou.com)
Date: 04/29/03


Date: Tue, 29 Apr 2003 12:03:32 -0400

On Tue, 29 Apr 2003 10:30:27 +0200, Joom
  <jmeyer@pax.ch> wrote:
> Hi guys
>
> In my script (AIX 4.3 shell script) I need to have a variable corresponding
> to the date of three
> days ago.
> With the command date +"%D" or +"%m%d%y" I obtain the result 04/25/2003 and
> I could make the %d minus 3 but how could make for date like 05/01/2003 or
> 01/01/2004?
> Anyone has an Idea about that?
>
Install the GNU version of date, and you can write
date -d "3 days ago"

-- 
bill marcum the mushroom-eating laboratory monkey
What kind of monkey are you? http://thesurrealist.co.uk/monkey.cgi


Relevant Pages