I tried to run commands using pipes.
Basic:
single="ls -l"
$single
which works as expected
Pipes:
multi="ls -l | grep e"
$multi
ls: |: No such file or directory
ls: grep: No such file or directory
ls: e: No such file or directory
...no surprise
bash < $multi
$multi: ambiguous redirect
next try
bash $multi
/bin/ls: /bin/ls: cannot execute binary file
Only
echo $multi > tmp.sh
bash tmp.sh
worked.
Is there a way to execute more complex commands without creating a script for execution?