Reputation: 365
I want to pass some parameters through xargs
, but as some bash commands like cd
, wait
are build-in commands, xargs
can't find them, so how can I pass the parameter to these commands?
For example, I expect this script to output ls
results 60s later:
sleep 60 &
pgrep sleep | wait;
ls
But wait
seems can't receive the pid, because I tried pgrep sleep | echo
and prints nothing, so the script displays the ls
result immediately without waiting.
Upvotes: 0
Views: 54