[Top][All Lists]

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

Re: [PATCH 6/6] use print or printf or cat as $ECHO

From: Eric Blake
Subject: Re: [PATCH 6/6] use print or printf or cat as $ECHO
Date: Mon, 10 Nov 2008 06:37:11 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080914 Thunderbird/ Mnenhy/

Hash: SHA1

According to Paolo Bonzini on 11/10/2008 5:06 AM:
>> 1) I don't have access to systems that are old or weird enough to check
>> if the performance penalty will happen often.  What do you think?

A single-fork fallback is better than nothing, and better than any expr or
other multi-fork fallback.  But preferring a builtin is definitely the way
to go.

>> 2) If ksh had a way to print without interpreting escapes *and dashes*,
>> I'd be glad to add it; do you know one?
> I thought of one after lunch: "print -r -- FOO".  This way we can print
> without forking on bash, zsh, ksh, ash/dash.

'man print' on Solaris 10 shows that ksh also understands "print -R -" as
a way to print "-" (but not "-n" or "--").  But you are right in realizing
that "print -r --" seems to work nicely.

At any rate, that means we should probably teach m4sh to try "print -r --"
as one of its options, prior to "printf %s\\n", during _AS_ECHO_PREPARE.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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