Skip to content

Instantly share code, notes, and snippets.

@filviu
Created December 7, 2015 12:41
Show Gist options
  • Save filviu/574fcc9cdc9f9821f6d1 to your computer and use it in GitHub Desktop.
Save filviu/574fcc9cdc9f9821f6d1 to your computer and use it in GitHub Desktop.
Launch multiple processes in the background with separate log files and random delay
# seq: no of processes
# RANDOM %3 max. delay of 2s
for i in $(seq 10); do ./bin/cmd --param1 --param2 > 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