Add several commands to queue at once
[code lang=”bash”]
echo “call0;call1;” | at -q b -m now
[/code]

Delete all queued jobs
[code lang=”bash”]
atrm $(atq | cut -f1)
[/code]

Parallelize from commands txtfile (each line is one cmd or sequence delimited by ; )
[code lang=”bash”]
cat calls.batch | xargs -0 –max-procs=3 -I CMD bash -c CMD
[/code]

Kill all python processes on all machines pc1 – pc5
[code lang=”bash”]
seq 1 5 | awk “{print ‘pc’$0 }” | xargs -I CMD ssh CMD “killall -u username python”
[/code]

List all python processes on all machines pc1 – pc5
[code lang=”bash”]
seq 1 5 | awk “{print ‘pc’$0 }” | xargs -I ‘{}’ sh -c “echo {};ssh {} ‘pgrep -u username python | xargs ps'”;
[/code]

Search & replace across all files in directory
[code lang=”bash”]
grep -rl ‘\-r 100’ * | xargs sed -i ‘s/\-r 100/\-r 20/’
[/code]