On Mon, Sep 23, 2002 at 12:17:03PM +1000, Jeff Ai wrote: > Hi guys, how can i get a past date? > i.e. the date for last Monday or the first Mondy of last month. > > do i have to write a script to do it?
Here ya go:
cal | awk 'NF >= 2 {m=$2} END {print m}'
or modify for other months, e.g. to get last monday
of March 2000:
cal 3 2000 | awk 'NF >= 2 {m=$2} END {print m}'
Regards,
Matt
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug
