Strange (wrong?) behaviour of "test ! -a file"

2018-10-21 Thread Martin Schulte
Hello, "help test" states that "-a file" and "-e file" do them same ("True if file exists.") This is not true when negating the result as you can see from the output below. The bash builtin even behaves different than the test from coreutils. It looks as if "! -a file" results in "( ! ) -a ( fil

Re: Strange (wrong?) behaviour of "test ! -a file"

2018-10-21 Thread Chet Ramey
On 10/21/18 5:32 AM, Martin Schulte wrote: > Hello, > > "help test" states that "-a file" and "-e file" do them same ("True if > file exists.") > > This is not true when negating the result as you can see from the output > below. The bash builtin even behaves different than the test from > coreut

Re: Strange (wrong?) behaviour of "test ! -a file"

2018-10-21 Thread Ilkka Virta
On 21.10. 20:03, Chet Ramey wrote: The help text for test says "The behavior of test depends on the number of arguments. Read the bash manual page for the complete specification." Can I suggest adding that note from the help text to the manual under "Bash Conditional Expressions" too? Perhap

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-21 Thread Robert Elz
Date:Fri, 19 Oct 2018 16:21:27 -0400 From:Grisha Levit Message-ID: | I guess it's a bit surprising that $_ is set to just the variable name | and not "the last argument to the previous command", which would be | the full assignment string. Except that a var a