Last Sunday of the Month

Steve Buehler steve at ibapp.com
Mon Apr 4 19:55:36 UTC 2005


RHEL ES 3
I can't seem to find this about the date command, but that doesn't mean it 
can't do it.  I have overlooked things in the past.

1.  Can the date command give you a date for the Last Sunday of a 
month?  Or do I have to go through a loop to check each day of the month to 
see if it is the last Sunday of the month?

2.  I can do a date --date="last sunday".  Is there a way to tell it to 
give me the date of 4 Sundays ago?  I tried date --date="4 sundays ago" and 
that didn't do it.

Thanks
Steve




More information about the redhat-list mailing list