[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mhbuild: extraneous information in message
From: |
Steffen Nurpmeso |
Subject: |
Re: mhbuild: extraneous information in message |
Date: |
Thu, 13 May 2021 17:15:19 +0200 |
User-agent: |
s-nail v14.9.22-137-g8f799568ca |
Hello Ralph.
Ralph Corderoy wrote in
<20210513082404.40C9A208CA@orac.inputplus.co.uk>:
|> 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.
...
[I see you use it, please note heirloom has had problems with
":>FILE", my web42 test script failed many years ago and i find
rm_file() {
# This does not work with Heirloom sh(1), even though the construct
# works as such; this was reproducable as long as i was tired to find
# the problem; let us just use printf(1) instead
#: > "${1}"
printf '' > "${1}"
}
I do not use :>X ever since for things possibly ending in the
public or meant to be portable. Whatever it may be, does it still
use mysterious memory handling, was it a miscompilation, pfff.]
|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).
Harald van Dijk answered the message for dash like this:
This is expected as dash's echo always processes backslashes. bash will
give the same output when its xpg_echo option is enabled.
Yes i did not know this. The last time i read a bash manual was
maybe 2.*, a very long time ago. Then a decade mksh, what do
i know. And do not rely on echo(1), ..yes. (It is just, not that
long ago, and if i recall correctly, newline escaping with \ to
come to a $PS2 line, where the reverse solidus was the last of
a couple thereof, was broken here and there, for whatever reason,
maybe it appeared to me as something related.)
Thanks for the effort.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
- Re: mhbuild: extraneous information in message, (continued)
- 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, 2021/05/13
- Re: mhbuild: extraneous information in message,
Steffen Nurpmeso <=
- 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
- Re: X/browser-based mime-types, Ralph Corderoy, 2021/05/13