Skip to content

Instantly share code, notes, and snippets.

nadavrap

Block or report user

Report or block nadavrap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dentearl
dentearl / gist:3278446
Last active Oct 10, 2019
bash loop to run tons of jobs but limit the background to a certain smaller number at a time. change the -gt 0 to be -gt _n_ to limit the number of background jobs to _n_
View gist:3278446
# primate version
for f in ../packagePrimates/analysis/comparatorWrapper-primates.*/; do
for c in A B C D; do
##########
# This block holds the background process count in check
while [ $(jobs | wc -l) -gt 0 ]; do
sleep 2;
done;
##########
for partner in simChimp simGorilla simOrang; do
You can’t perform that action at this time.