|
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 $
[Prev in Thread] | Current Thread | [Next in Thread] |