[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
posted @ 2024-06-26 17:38  Zhentiw  阅读(3)  评论(0编辑  收藏  举报