Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com >Received: from port.de (oe AT ute DOT port DOT de [194.173.33.3]) by ute.port.de (8.8.8/8.8.8) with ESMTP id IAA05244 for ; Tue, 16 Nov 1999 08:51:44 +0100 Message-ID: <38310D10.4F49A208@port.de> Date: Tue, 16 Nov 1999 08:51:44 +0100 From: Heinz-Juergen Oertel Organization: port GmbH Germany X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.36 i586) X-Accept-Language: en MIME-Version: 1.0 To: "'Cygwin mailing list'" Subject: Re: Bash and $(date) References: <000a01bf2fa4$8bc26c60$effcf584 AT rtp-cbjones DOT corpeast DOT baynetworks DOT com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id DAA26857 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:rehm AT singingfish DOT com] > > Sent: Monday, November 15, 1999 10:41 AM > > To: cygwin AT sourceware DOT cygnus DOT com > > 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 cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- 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:oe AT port DOT de Germany http://www.port.de ============================================== -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com