bug-bash
[Top][All Lists]
Advanced

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

Re: bash 3.2, escape sequences


From: Chet Ramey
Subject: Re: bash 3.2, escape sequences
Date: Wed, 07 Feb 2007 22:36:15 -0500
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

Sebastian Kapfer wrote:

> I'm not quite getting the changes in bash's handling of escape
> sequences.

I can't reproduce your results:

z4.local(1)$ ./bash --version
GNU bash, version 3.2.9(5)-release (i386-apple-darwin8.8.1)
Copyright (C) 2005 Free Software Foundation, Inc.
z4.local(1)$ ./bash
z4.local(2)$ echo '\a'
\a
z4.local(2)$ echo -E '\a'
\a
z4.local(2)$ echo -e '\a'| cat -v
^G
z4.local(2)$ echo '\\ \ \ \ '
\\ \ \ \
z4.local(2)$ echo '\\ \a \ \ '
\\ \a \ \
z4.local(2)$ echo 'wow\awow'
wow\awow
z4.local(2)$ echo $'\a' | cat -v
^G
z4.local(2)$ echo \\a
\a

I suspect that you have echo defined as a function or alias, or
something in $PROMPT_COMMAND or $PS1 is obscuring the output.

> On a related note, the documented escape sequences handled by "echo"
> differ between help echo and man echo  (-e vs. -E).

Well, they document different programs.  `help echo' describes the
bash builtin, and `man echo' describes /bin/echo.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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