date of 7 days ago
vodhner at cox.net
vodhner at cox.net
Fri Dec 30 11:54:32 MST 2005
Dan Lund wrote:
> Whats a nice quick way to find out what the
> date was 7 days ago?
> ...
> date --date='7 days ago'
Note that only Gnu "date" (standard in Linux) can do this.
In non-Gnu environments you have to get your shoes dirty to do this correctly.
I just yesterday discovered the $SECONDS variable in ksh and bash. It lets you measure elapsed time in a shell script without spawning separate processes -- very nice.
More information about the PLUG-discuss
mailing list