1 2 3 4 5 6 7 8 9 10 11 12 13
function run_ { local output=$(eval source "$@") flock -x $0 echo -e "$output" } function run { if [ $parallel -gt 0 ]; then run_ "$@" & else run_ "$@" fi }