For example, if I execute
ps aux | awk '{print $1}' | xargs -I {} echo {}
I want to let the shell sleep for 1 second between each echo
.
How can I change my shell command?
For example, if I execute
ps aux | awk '{print $1}' | xargs -I {} echo {}
I want to let the shell sleep for 1 second between each echo
.
How can I change my shell command?
Replace
echo
by some shell script namedsleepecho
containingIf your
awk
supports it:or skip
awk
andxargs
altogetherYou can use following syntax:
Be careful with spaces and semicolons though. After every command between brackets, semicolon is required (even after last one).