This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Bash and $(date)


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

> -----Original Message-----
> From: Eric Rehm [mailto:rehm@singingfish.com]
> Sent: Monday, November 15, 1999 10:41 AM
> To: cygwin@sourceware.cygnus.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@sourceware.cygnus.com
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]