Subject: Re: How to get arbitrary time in shell script?
To: Christoph Kaegi <kgc@zhwin.ch>
From: Luke Bakken <luke_bakken@yahoo.com>
List: netbsd-users
Date: 11/28/2001 15:36:52
korn shell
print $(($(date +%d)-3))
what date format do you want?
On Wed, 28 Nov 2001, Christoph Kaegi wrote:
>
> I'm doing a backup script, where I want to select all
> files modified during the last three days.
>
> I would do that with pax's -T option.
> (find(1) isn't an option as I have a backup.conf which
> contains all the paths and filenames to backup)
>
> So, how can i get a date from three days ago?
> date(1) doesn't have an option like
>
> date '+ 3 days ago'
>
> How are you people doing this?
> (without writing a c program, of course)
>
> Thanks in advance for any hints.
>
> Chris
>
> --
> ----------------------------------------------------------------------
> Christoph Kaegi kgc@zhwin.ch
> ----------------------------------------------------------------------
>