libtool-patches
[Top][All Lists]
Advanced

[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:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkYOQcACgkQ84KuGfSFAYAOOwCdEpPvxch0jfDi1Mv2Okalm/vI
KbIAn2407Ron5tQfg3rGAlIUqYKoeoSQ
=K5/F
-----END PGP SIGNATURE-----




reply via email to

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