Skip to content

Instantly share code, notes, and snippets.

@dentearl
dentearl / gist:3278446
Last active May 8, 2020 17:53
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_
# 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
# TODO
# Potentially create a version with just Sqlite
# create_source_to_standard_vocab_map.sql - need to improve performance
# include additional measurement units in the vocabulary shard
# abstract creation of concepts.csv to create synthea concepts from concept extraction jar at execution
# add scan report to loop (whiterabbit)
options(connectionObserver = NULL)
options(useFancyQuotes = FALSE)