[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printf cleanup for POSIX and Bash compatibility
From: |
Paul Eggert |
Subject: |
Re: printf cleanup for POSIX and Bash compatibility |
Date: |
Wed, 07 Jul 2004 10:42:58 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Tim Waugh <address@hidden> writes:
> Sorry there are so many, by the way -- I did try to make them fewer in
> number with the move to 4.5.x a while back.
No problem. They indicate some other useful features that should be
in coreutils. The biggest one (and the biggest hassle) is i18n. I
think the patches in Fedora Core in that area have some problems,
though, and it's a bit of a pain to think through all the issues
there, though I've been meaning to make the time....
I should mention that shell commands like this:
printf '%ld\n' 1
are not portable: POSIX doesn't require support for any length
modifiers, not even 'l'. However, coreutils printf already supports
%ld, so I figure it might as well support %lld while we're at it, for
compatibility with Bash if nothing else. (Perhaps the coreutils
documentation should warn about the portability problems in this sort
of usage, though. If I have the time I'll write it up.)