Re: echo -E not preventing interpolation of double backslash

Richard Dawe <[email protected]> Fri, 25 Apr 2003 18:46:54 +0100
Newsgroups gmane.comp.gnu.sh-utils.bugs
Message-ID <[email protected]>
Hello.

"Soliday, John L." wrote:
> 
> # echo -E "test\tabc\def"
> test\tabc\def                       (Correct)
> 
> # echo -E "test\\abc\def"
> test\abc\def                        (Not correct)
> 
> RedHat 7.3
> sh-utils-2.0.11-14

This is because your shell is passing the \\ as \ to echo. Try it with single
quotes, so the shell doesn't expand the string. This seems to work on my
system (RedHat 6.2, bash 1.14.7, sh-utils 2.0).

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]