Parentheses for subshell don't work when stored in a variable
问题 The command: ( echo 1 ) works fine when I input it in the command line but if I store it as a variable and call it, it gives the error: (echo: command not found Code: input="( echo 1 )" $input Why doesn't it evaluate the parentheses the same way and put it into a subshell when I call it this way? 回答1: This is discussed in full detail in BashFAQ #50. An unquoted expansion goes through only two stages of shell parsing: Field-splitting, and glob expansion. Thus, ( echo 1 ) is first split into