[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: why does command echo \\\foobar print \\foobar
From: |
Paul Smith |
Subject: |
RE: why does command echo \\\foobar print \\foobar |
Date: |
Sun, 07 Feb 2010 09:41:01 -0500 |
On Sun, 2010-02-07 at 06:24 -0800, Mark Galeck (CW) wrote:
> OK, let me make sure I am not confused:
>
> Are you saying that on Unix:
>
> >echo \\\foobar
> \foobar
>
> And that is why you expected that?
Yes. Well, to be precise I expected it because I know how backslash
escaping works in the shell.
Without any quoting, the first backslash escapes the second backslash,
giving a single backslash, and the third backslash escapes the "f".
Since an escaped character is just that character, "\f" is just "f", and
the expected result is "\foobar".
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/06
- RE: why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/06
- Re: why does command echo \\\foobar print \\foobar, Paul Smith, 2010/02/06
- RE: why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/06
- RE: why does command echo \\\foobar print \\foobar, Paul Smith, 2010/02/07
- RE: why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/07
- RE: why does command echo \\\foobar print \\foobar, Paul Smith, 2010/02/07
- RE: why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/07
- RE: why does command echo \\\foobar print \\foobar,
Paul Smith <=
- Re: why does command echo \\\foobar print \\foobar, Eli Zaretskii, 2010/02/07
- RE: why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/07
- Re: why does command echo \\\foobar print \\foobar, Eli Zaretskii, 2010/02/07
- RE: why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/07
- Re: why does command echo \\\foobar print \\foobar, Eli Zaretskii, 2010/02/07
- RE: why does command echo \\\foobar print \\foobar, Duane Campbell, 2010/02/07
- RE: why does command echo \\\foobar print \\foobar, Mark Galeck (CW), 2010/02/07