[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mhbuild: extraneous information in message
From: |
Ralph Corderoy |
Subject: |
Re: mhbuild: extraneous information in message |
Date: |
Thu, 13 May 2021 09:24:04 +0100 |
Hi Steffen,
> For example it treats un/even reverse solidus at EOLs nice, which is
> still not true as of today for shells, for example:
>
> #?0|kent:steffen$ echo du \\\\\
> > hey
> du \\hey
> #?0|kent:steffen$ dash
> #kent:$ echo du \\\\\
> > das
> du \das
> #kent:$
I don't think the backslash at the end of the line is relevant. Trying
four Bourne-alike shells, I get two outputs.
A)
bash$ echo foo \\\\bar
foo \\bar
bash$ echo foo \\\\\
> bar
foo \\bar
$ /bin/echo foo \\\\bar
foo \\bar
$ /bin/echo foo \\\\\
> bar
foo \\bar
B)
dash$ echo foo \\\\bar
foo \bar
dash$ echo foo \\\\\
> bar
foo \bar
heirloom$ echo foo \\\\bar
foo \bar
heirloom$ echo foo \\\\\
> bar
foo \bar
Clearly, echo's argv[2] will start with two backslashes. The issue is
whether echo(1) should interpret that as an escape and print out just
one as seen in B.
My echo(1p) here says
‘If the first operand is −n, or if any of the operands contain
a <backslash> character, the results are implementation-defined.’
It says that because there were two entrenched divergent implementations
which couldn't be standardised, thus printf(1).
--
Cheers, Ralph.
- Re: mhbuild: extraneous information in message, (continued)
- Re: mhbuild: extraneous information in message, Ken Hornstein, 2021/05/12
- Re: mhbuild: extraneous information in message, Laura Creighton, 2021/05/12
- Re: mhbuild: extraneous information in message, Valdis Klētnieks, 2021/05/12
- Re: mhbuild: extraneous information in message, Laura Creighton, 2021/05/12
- Re: mhbuild: extraneous information in message, Ken Hornstein, 2021/05/12
- Re: mhbuild: extraneous information in message, Valdis Klētnieks, 2021/05/12
- Re: mhbuild: extraneous information in message, Ralph Corderoy, 2021/05/12
- Re: mhbuild: extraneous information in message, Steffen Nurpmeso, 2021/05/12
- Re: mhbuild: extraneous information in message, Ken Hornstein, 2021/05/12
- Re: mhbuild: extraneous information in message, Steffen Nurpmeso, 2021/05/12
- Re: mhbuild: extraneous information in message,
Ralph Corderoy <=
- Re: mhbuild: extraneous information in message, Steffen Nurpmeso, 2021/05/13
- Re: mhbuild: extraneous information in message, Ken Hornstein, 2021/05/12
- Re: mhbuild: extraneous information in message, Laura Creighton, 2021/05/13
- Re: mhbuild: extraneous information in message, Ken Hornstein, 2021/05/13
- Re: mhbuild: extraneous information in message, Ralph Corderoy, 2021/05/13
- Re: mhbuild: extraneous information in message, Ken Hornstein, 2021/05/13
- Re: mhbuild: extraneous information in message, David Levine, 2021/05/12
- X/browser-based mime-types, Michael Richardson, 2021/05/12
- Re: X/browser-based mime-types, David Levine, 2021/05/12
- Re: X/browser-based mime-types, Michael Richardson, 2021/05/12