help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] confused by command substitution...


From: Alfred M. Szmidt
Subject: [Help-bash] confused by command substitution...
Date: Sat, 09 Feb 2019 06:01:53 -0500

I'm not understanding the difference here, or why the last example
works.  Anyone got a good explanation?

$ if "$(echo x)"; then echo foo; fi
bash: x: command not found
$ if "$(echo x > /dev/null)"; then echo foo; fi
bash: : command not found
$ if $(echo x); then echo foo; fi
bash: x: command not found
$ if $(echo x > /dev/null); then echo foo; fi
foo
$ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]