I find dates of this and other formats so often
required in shell scripts that I wrote a perl script
that returns a format of date based on its name. It
does simple arithmetic; for examples, see below.
I would be happy to furnish a copy, if you like this
better than the "date" solutions others suggested.
For me, this is much better, because it gives me a
uniform, small, and intuitive approach that I can use
regardless of who controls the machine, how old its
software is, or who manages it.
Examples:
% yyyymmdd # today in that format
20000322
% yyyymmlast -1M # last day of the month, as of a month ago
20000229
% msfirstsyy # "s" is slash; first day of current month
3/1/00
Regards,
- Irving
-
[EMAIL PROTECTED] Happy Man Corporation
+1 206 463 9399, ext. 101 4410 SW Pt Robinson Rd
fax: +1 209 463 9255 Vashon, WA 98070 USA
Solid Value Investment Letter -- more than 14 years
safely outperforming the stock market through wise,
conservative selection: http://www.solid-value.com/