[Top][All Lists]

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

Re: _AS_ECHO_N_PREPARE - bug correction in ksh88 on AIX 6.1

From: Eric Blake
Subject: Re: _AS_ECHO_N_PREPARE - bug correction in ksh88 on AIX 6.1
Date: Tue, 30 Jun 2009 05:56:15 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090605 Thunderbird/ Mnenhy/

Hash: SHA1

According to Ralf Wildenhues on 6/30/2009 12:07 AM:
> Thinking about it again, my patch was too lax and should have been
> stricter: within a command substitution, the \c causes all but the
> first character of the output to be removed.  Let's test for that,
> just like Jan suggested, but just not set ECHO_C at all in this
> case, and set ECHO_T to a tab like is done in the other bailout
> case.
> Thus I suggest this patch.  OK?

Yes, once these nits are fixed:

> address@hidden  Within a command substitution, @samp{echo 'string\c'} will
> +mess up the internal state of ksh88 on AIX 6.1 so that it will print
> +the first character @samp{c} only, followed by a newline, and then


> +entirely drop the output of the next echo in a command substitution.

Would it be worth an @example showing this weird behavior, or do you think
the paragraph was sufficient?  I could go either way.

>  case `echo -n x` in @%:@((((

You added a ), so this comment should add a (.

>  -n*)
> -  case `echo 'x\c'` in
> +  case `echo 'xy\c'` in
>    *c*) ECHO_T='      ';;     # ECHO_T is single tab character.
> -  *)   ECHO_C='\c';;
> +  xy*) ECHO_C='\c';;

I'd rather use exactly 'xy)', since the whole point of \c was that no
other characters appeared.

- --
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 home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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