Skip to content

Instantly share code, notes, and snippets.

@filviu
Created November 12, 2015 13:13
Show Gist options
  • Save filviu/885c4df44316a7ba7c94 to your computer and use it in GitHub Desktop.
Save filviu/885c4df44316a7ba7c94 to your computer and use it in GitHub Desktop.
Launch multiple commands in the background
for i in $(seq 10); do command ARG1 ARG2 > output_$i.txt 2>&1 & sleep $(($RANDOM %3));done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment