On 08/09/2017 05:47 PM, bruce wrote:
aa='bash'
xx="pgrep -f '"${aa}"' | wc -l"
echo $xx <<< this dsplays the test pgrep
echo `$xx` << err msg
echo `${xx}` << err msg...
eval "$xx"
or:
echo $(eval "$xx")
In the invocation you're trying to use, "|" is being passed as an
argument to pgrep, rather than creating a pipe between commands/processes.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx