I tried to run commands using pipes.
Basic:
single=\"ls -l\" $single
which works as expected
Pipes
when you want to run commands with pipes, just run it. Don't ever put the command into a variable and try to run it. Simply execute it
ls -l |grep
If you want to capture the output, use $()
var=$(ls -l |grep .. )