bug-bash
[Top][All Lists]
Advanced

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

bash 3.2, escape sequences


From: Sebastian Kapfer
Subject: bash 3.2, escape sequences
Date: Thu, 08 Feb 2007 01:21:48 +0100

Hi Chet, hi bug-bash readers,

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


sk@nexus(~)> echo '\a'
'\a

Ouch?  This is not related to escape sequence handling:

sk@nexus(~)> echo -E '\a'
'\a
sk@nexus(~)> echo -e '\a'
'

And yet, it is:

sk@nexus(~)> echo '\\ \ \ \ '
\\ \ \ \ 
sk@nexus(~)> echo '\\ \a \ \ '
 \ \ '\\ \a \ \ 
sk@nexus(~)> echo 'wow\awow'
wow'wow\awow

sk@nexus(~)> echo $'\a'
'
sk@nexus(~)> echo \\a
\a

Finally!

sk@nexus(~)> echo $BASH_VERSION 
3.2.5(1)-release
sk@nexus(~)> gcc --version
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)


Sorry if I'm being terribly ignorant here, but I don't get it.

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

-- 
Best Regards,  | Hi! I'm a .signature virus. Copy me into
 Sebastian     | your ~/.signature to help me spread!

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

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