[Bash] Subshell
Subshell ()
You can wrap a cmd into ()
then it works a spreated command line.
$ (if test -f cool.txt; then echo true; else echo false; fi); echo $?
false
You can wrap a cmd into ()
then it works a spreated command line.
$ (if test -f cool.txt; then echo true; else echo false; fi); echo $?
false