view bin/extract.sh @ 60:ff4e85d8ec31

switch for use on login server, invoke by hand with 0/1 as only cmd line arg
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Thu, 23 Apr 2020 17:25:25 +0100
parents 1e479e3ea9c4
children
line wrap: on
line source

#!/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) $?