I tried to run commands using pipes.
The main
single="ls -l" $single
which works as expected
<power> 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
... not surprising
bash < $multi $multi: ambiguous redirect
next attempt
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 to execute?
command-line linux bash shell
stacker
source share