[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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]