Subject: Re: Bash and $(date)
From: Heinz-Juergen Oertel <[email-masked]>
To: "'Cygwin mailing list'" <[email-masked]>
Date: Tue, 16 Nov 1999 08:51:44 +0100

Brian Jones wrote:
> 
> date -d '1 day ago' +%d
> 
> For the number representing yesterday's day of the month.  See date --help
> for more information.  Of course if cygwin always came with man pages the
> answer would be RTFM.
> 
> Brian

Have you tested it with Cygwin?
I forgot to append cygwin to th mail address, my answer to Eric from 'yesterday'

----------------------------------------------------------------------------
try
$ date -d yesterday

I am using
$ date --version
date (GNU sh-utils) 1.16

at LINUX and Cygwin W95.
But note the differences:
$ uname -a 
CYGWIN_95-4.0 DAVID 20.1 (0.3/1/1) 1998-12-3 20:39:18 i586 unknown

W95:
$ date; date -d yesterday
Mon Nov 15 18:19:52  1999
Mon Nov 15 18:20:52  1999       # + one minute 
$ date; date -d tomorrow
Mon Nov 15 18:20:01  1999
Mon Nov 15 18:21:01  1999       # + one minute 

LINUX:
$ date; date -d yesterday
Monday 15 of November 18:04:30 CET 1999 KW 46
Sunday 14 of November 18:04:30 CET 1999 KW 45

I hope it's a known error
and not in the newer versiion
----------------------------------------------------------------

> > -----Original Message-----
> > From: Eric Rehm [mailto:[email-masked]]
> > Sent: Monday, November 15, 1999 10:41 AM
> > To: [email-masked]
> > Subject: FW: Bash and $(date)
> >
> >
> > Is there an easy way to get *yesterday's* date using the date command
> > in a bash script?
> >
> > I know how to parse the date, use integer variables, etc.,
> > but I'd rather
> > not have to put in all the year, month, day logic into a script.
> >
> > /eric rehm
> >
> >
> > --
> > Want to unsubscribe from this list?
> > Send a message to [email-masked]
> >
> 
> --
> Want to unsubscribe from this list?
> Send a message to [email-masked]

-- 
with best regards / mit freundlichen Grüßen

  Heinz-Jürgen Oertel

==============================================
Heinz-Juergen Oertel
port GmbH               phone +49 345 77755-0
Regensburger Straße 7c  fax   +49 345 77755-20
D-06132 Halle/Saale     mailto:[email-masked]
Germany                 http://www.port.de
==============================================

--
Want to unsubscribe from this list?
Send a message to [email-masked]