Re: Sus behaviour when cmd string ends with single backslash

2022-02-14 Thread Alex fxmbsw7 Ratchev
i like the currently showed behavior of '\' parsed as arg no need to error .. if u meant that, .. On Mon, Feb 14, 2022 at 11:17 PM Chet Ramey wrote: > On 2/13/22 3:15 PM, vzvz...@gmail.com wrote: > > > Bash Version: 5.0 > > Patch Level: 17 > > Release Status: release > > > > Description: > > > >

Re: Sus behaviour when cmd string ends with single backslash

2022-02-14 Thread Chet Ramey
On 2/13/22 3:15 PM, vzvz...@gmail.com wrote: Bash Version: 5.0 Patch Level: 17 Release Status: release Description: Background -- Commit a0c0a00fc419b7bc08202a79134fcd5bc0427071 (bash-4.4) introduced a change in parse.y with following documentation in the change logs: parse.y

Re: Sus behaviour when cmd string ends with single backslash

2022-02-14 Thread Zoltan Vajda
vzvz...@gmail.com writes: The mentioned bug is indeed fixed by this change. However, in case of another edge case following new behaviour is observable: $ bash -c 'echo \' \ $ # backslash appears on output It's an interesting case, since the command that Bash is executing is e-c-h-o-sp

Re: Sus behaviour when cmd string ends with single backslash

2022-02-13 Thread Robert Elz
Date:Sun, 13 Feb 2022 22:38:47 -0600 From:Dennis Williamson Message-ID: | It occurs to me that the -r option of read is related. It is - if a backslash is the final char of input (ie: no newline follows) when read is used without -r, what happens to that \ will

Re: Sus behaviour when cmd string ends with single backslash

2022-02-13 Thread Dennis Williamson
On Sun, Feb 13, 2022, 9:48 PM Robert Elz wrote: > Date:Sun, 13 Feb 2022 21:38:19 -0500 > From:"Dale R. Worley" > Message-ID: <87o83a895w@hobgoblin.ariadne.com> > > | The two a-priori plausable behaviors are for the backslash to be taken > | literally (which i

Re: Sus behaviour when cmd string ends with single backslash

2022-02-13 Thread Robert Elz
Date:Sun, 13 Feb 2022 21:38:19 -0500 From:"Dale R. Worley" Message-ID: <87o83a895w@hobgoblin.ariadne.com> | The two a-priori plausable behaviors are for the backslash to be taken | literally (which is what happens) or for it to vanish as some sort of | incom

Re: Sus behaviour when cmd string ends with single backslash

2022-02-13 Thread Dale R. Worley
vzvz...@gmail.com writes: > The mentioned bug is indeed fixed by this change. However, in case of > another edge case following new behaviour is observable: > > $ bash -c 'echo \' > \ > $ # backslash appears on output It's an interesting case, since the command that Bash is executing is e-c-h-o

Re: Sus behaviour when cmd string ends with single backslash

2022-02-13 Thread Alex fxmbsw7 Ratchev
On Sun, Feb 13, 2022, 22:23 wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 > -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong > -Wformat -Werror=format-security -W

Sus behaviour when cmd string ends with single backslash

2022-02-13 Thread vzvzvz2
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname o