#!/usr/bin/bash
# Launch parallel tasks, one per segment from extract_?.txt
#  First line thereof gives CC identifier
echo $(date) $(hostname)
h=$(hostname)
hn=${h##*n}
head -1 extract_${hn}.txt |\
 { read cc ; \
 tail -n +2 extract_${hn}.txt |\
    parallel --joblog topjob.log --will-cite  -j 4 -N 1 \$HOME/bin/doExtract.sh "$cc" '{#}' '{}' ; }
echo $(date) $(hostname) $?
