How can I make a bash string of command with redirect and pipe?

后端 未结 1 1560
灰色年华
灰色年华 2021-01-21 02:40

I want to make a bash string of commands with redirect and/or pipe, and use it to either display the string of commands or execute the string of commands. A simple command witho

相关标签:
1条回答
  • 2021-01-21 03:20

    If you want the shell to evaluate the string as a command, tell it to do so:

    eval "$command"
    echo "$command"
    
    0 讨论(0)
提交回复
热议问题