how to expand a string in bash so that it evaluates to a pipeline
Suppose I have the following variable in a bash script cmd='echo hi | wc'
.
Since I forgot how many characters are in the string “hi”, I want to run cmd
.
Suppose I have the following variable in a bash script cmd='echo hi | wc'
.
Since I forgot how many characters are in the string “hi”, I want to run cmd
.