[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: portability of 'printf' command
From: |
Ben Pfaff |
Subject: |
Re: portability of 'printf' command |
Date: |
Sun, 21 Feb 2010 12:53:06 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> The GNU Coding Standards [1] don't mention it as a portable utility. Indeed,
> when you use bash version 1 (which does not have 'printf' built-in) on a
> platform that does not have a /usr/bin/printf program, you would be hosed.
> But which platforms are this? The Autoconf manual [2] does not mention a lack
> of 'printf' anywhere.
The Autoconf manual does imply that it is missing in some places:
New applications which are not aiming at portability should use
`printf' instead of `echo'. M4sh provides the `AS_ECHO' and
`AS_ECHO_N' macros, which choose between `echo -n' on
implementations where that works, `printf' if it is available, or
other creative tricks in order to work around the above problems.
--
Ben Pfaff
http://benpfaff.org
- Re: [patch] fix "broken pipe" message from lseek test, (continued)
- Re: [patch] fix "broken pipe" message from lseek test, Ben Pfaff, 2010/02/20
- Re: [patch] fix "broken pipe" message from lseek test, Eric Blake, 2010/02/20
- Re: [patch] fix "broken pipe" message from lseek test, Bruno Haible, 2010/02/20
- Re: [patch] fix "broken pipe" message from lseek test, Ben Pfaff, 2010/02/21
- Re: [patch] fix "broken pipe" message from lseek test, Bruno Haible, 2010/02/21
- portability of 'printf' command, Bruno Haible, 2010/02/21
- Re: portability of 'printf' command, Bob Friesenhahn, 2010/02/21
- Re: portability of 'printf' command, Thomas Dickey, 2010/02/22
- Re: portability of 'printf' command, Bob Friesenhahn, 2010/02/21
- Re: portability of 'printf' command, Thomas Dickey, 2010/02/22
- Re: portability of 'printf' command,
Ben Pfaff <=
- Re: [patch] fix "broken pipe" message from lseek test, Eric Blake, 2010/02/22