[Bash] Subshell

Zhentiw發表於2024-06-26

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