On Tuesday, December 29, 2009, Matthias Kilian  wrote:
> On Mon, Dec 28, 2009 at 10:45:51PM -0800, Philip Guenther wrote:
>> $ printf 'foo\\\\bar\n'
>> foo\\bar
>> $ printf 'foo\\\\bar\n' | { read -r foo; echo "$foo"; }
>> foo\bar
>
> That's backslash interpretation performed by the echo shell builtin.

Gah!  You're right; I was careful to use printf instead of echo on the
input side but forget to do so on the output side.

So it's good news/bad news, J.C.: the good news is your script will
work as desired with the -r option, the bad news is that the time you
spent filing a bug was wasted.  Sorry about that!

Philip Guenther

Reply via email to