Denys Vlasenko wrote:
> $ f() { for i; do echo "|$i|"; done; }
> $ x=x
> $ e=
> $ f ${x:+ ""}
> ^^^ prints nothing, bug?
>
> $ ${x:+"" }
> ^^^ prints nothing, bug?
Insufficient quoting. That argument should be quoted to avoid the
whitespace getting stripped. (Is that during wor
> On 2018 Jul 20 , at 10:40 a, Mr Guiguilebreton wrote:
>
> Yes, i now. I test the syntax and the parse error because I programming a
> command interpreter bash in C language and I report the Segmentation Fault
> for help you to debug. If you want I can help you free to solve the problem.
Se
On 07/20/2018 04:43 PM, Denys Vlasenko wrote:
$ ${x:+"" }
^^^ prints nothing, bug?
Should be:
$ f ${x:+"" }
$ f ${x:+"$e""$e"""}
^^^ prints nothing, bug?
Should be:
$ f ${x:+"$e""$e" ""}
sorry.
$ f() { for i; do echo "|$i|"; done; }
$ x=x
$ e=
$ f ${x:+""}
||
^^^ correct
$ f ${x:+ ""}
^^^ prints nothing, bug?
$ ${x:+"" }
^^^ prints nothing, bug?
$ f ${x:+"$e"}
||
^^^ correct
$ f ${x:+ "$e"}
^^^ prints nothing, bug?
$ f ${x:+"$e""$e"""}
||
^
> On 2018 Jul 20 , at 9:27 a, Mr Guiguilebreton wrote:
>
> Hello, check this command in GNU bash, version 3.2.57(1)-release
> (x86_64-apple-darwin17):
>
> ls () { ls -lG;}; ls
You wrote a recursive function with no base case. Don't do that.
ls () { command ls -lG; }; ls
or use an alias
Hello, check this command in GNU bash, version 3.2.57(1)-release
(x86_64-apple-darwin17):
ls () { ls -lG;}; ls
freely,
Guillaume Madec
(+33)6 46 01 00 79
PS: It's a pleasure to help the FSF