Hi!

$ rpm -qf `which echo`
sh-utils-2.0-13

$ cat /etc/redhat-release
Red Hat Linux release 7.1 (Seawolf)

Is it correct behaviour for "echo" that

  echo -en "\\\b"

prints out "\b" instead of a "\" which is erased by the subsequent
backspace immediately?

On the contrary, both

  echo -en "\\"

and

  echo -en "\b\\"

print out a backslash correctly.

---------- Forwarded message ----------
Date: Wed, 6 Jun 2001 23:24:58 +0200 (CEST)
From: Michael Schwendt <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: RE: Two bash programming questions

On 2001-06-06, Taylor, ForrestX wrote:

>> echo with "-e".
>
>
>That's what I have.  From the original post:
>>   [ $C == 0 ] && echo -e -n "\b\\"
>What I want is something like:
>   [ $C == 0 ] && echo -e -n "\\\b"
>
>a \ followed by a backspace.  This prints out \b.

Split it:

  echo -en "\\" ; echo -en "\b"

Whether it's a bug, I don't know.

Notice, however, that a \b after a character erases that one
immediately. Doesn't look as nice as erasing the last char before
printing a new one.




_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to