On Thu, 25 Sep 2003 08:40:02 +0200 Roger Oberholtzer <[EMAIL PROTECTED]> wrote:
> While on the octal front, anyone know how to get the date command,
> when used with format specifiers, NOT to prefix a number with a zero?
> I use it in a Makefile to put a time stamp in a C program, but the
> leading 0 forces the compiler to think it is octal. So, this month
> '09' is not accepted. Offending are month, hour and minute. day and
> year have a format without leading 0.
>
> e.g.;
>
> date +%m
>
> gives '09'.
from the man page:
By default, date pads numeric fields with zeroes. GNU date
recognizes
the following modifiers between `%' and a numeric directive.
`-' (hyphen) do not pad the field `_' (underscore) pad the
field
with spaces
Ciao,
David A. Bandel
--
Focus on the dream, not the competition.
Nemesis Racing Team motto
GPG key autoresponder: mailto:[EMAIL PROTECTED]
pgp00000.pgp
Description: PGP signature
_______________________________________________ Linux-users mailing list [EMAIL PROTECTED] Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users
