Idea for date(1) improvement.

Bjoern A. Zeeb bzeeb-lists at lists.zabbadoz.net
Wed Sep 8 04:45:11 PDT 2004


On Wed, 8 Sep 2004, Poul-Henning Kamp wrote:

> I have sometimes needed to get the date of yesterday or last monday
> and so on for creating filenames.
>
> We have this very flexible code in at(1) and cvs(1) for specifying
> time.
>
> Anyone up for making it possible to say:
>
> 	date -w "2 days ago"
>
> ?

-w ? isn't it -v ?  date -v-2d ?

Anyway I do not like both of this ... I think I haven't used -v
since that one day in 2000....

: THE PROBLEM:
: ---------------
:
: for this night :
:
: > date
: Sat Apr  1 00:26:11 CEST 2000
: > date -v-1d +%Y%m
: 200002
: > date -v-1d +%Y%m%d
: 20000229
: > date
: Sat Apr  1 00:26:21 CEST 2000

-- 
Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT


More information about the freebsd-current mailing list