Manage date in bash
am 31.10.2007 16:22:53 von patrickHi,
do you know if exists a bash metods/function to do today date -1 day
or -2 day ecc?
example (object style)
today is 31102007, date.today(-1) = 30102007
Thanks
Hi,
do you know if exists a bash metods/function to do today date -1 day
or -2 day ecc?
example (object style)
today is 31102007, date.today(-1) = 30102007
Thanks
On 2007-10-31, Patrick
> Hi,
> do you know if exists a bash metods/function to do today date -1 day
> or -2 day ecc?
> example (object style)
> today is 31102007, date.today(-1) = 30102007
> Thanks
>
The date command is not part of bash, but if you use bash, chances are
that you have GNU date, and you can use the -d option, for example
date -d yesterday
Tue Oct 30 12:42:50 EDT 2007
date -d yesterday +%d%m%Y
30102007
"man date" or "info date" for more details.
On 31 Ott, 17:45, Bill Marcum
> On 2007-10-31, Patrick
> > do you know if exists a bash metods/function to do today date -1 day
> > or -2 day ecc?
> > example (object style)
> > today is 31102007, date.today(-1) = 30102007
> > Thanks
>
> The date command is not part of bash, but if you use bash, chances are
> that you have GNU date, and you can use the -d option, for example
> date -d yesterday
> Tue Oct 30 12:42:50 EDT 2007
> date -d yesterday +%d%m%Y
> 30102007
>
> "man date" or "info date" for more details.
on solaris 10 it doesn't work... not exist "date -d"