[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: portability of 'printf' command

From: Karl Berry
Subject: Re: portability of 'printf' command
Date: Wed, 7 Apr 2010 17:33:14 GMT

    And the reason that I would _like_ to have printf(1) added to the list
    of portable tools is because of the number of non-portable shell scripts
    that are currently using 'echo -n', which is doomed to failure in some
    shells, instead of printf because printf was not listed in the permitted

About that, echo -n was and never will be portable, have to go through
the tests of -n vs. \c, etc.  I doubt that's news to anyone here :).

I seem to recall that we've already given up on explicitly testing other
things lacking in SunOS 4, though the specifics elude me. 

In any event, I suspect that anyone using such an ancient system *and*
installing a brand-new version of package foo that uses printf in its
autoconfery would also have installed coreutils (or at least sh-utils),
and therefore will have printf after all.

So I'm not seeing a strong argument against this.  Barring objections,
I'll send it on to rms ... except I'll be offline until next Tuesday, so
don't expect anything before next week.


reply via email to

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