Mercurial > hg > cc > cirrus_home
annotate bin/extract.sh @ 27:7a2bc060230d
first cut at doing extraction here
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Wed, 18 Mar 2020 15:23:53 +0000 |
parents | a82c325e8b32 |
children | a95a1b31f5e9 |
rev | line source |
---|---|
27
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
1 #!/usr/bin/bash |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
2 # Launch parallel tasks, one per segment from extract_?.txt |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
3 echo $(date) $(hostname) |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
4 h=$(hostname) |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
5 hn=${h##*n} |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
6 head -1 extract_${hn}.txt |\ |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
7 { read cc |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
8 tail -n +2 extract_${hn}.txt |\ |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
9 parallel --will-cite -j 4 -N 1 $HOME/bin/doExtract.sh "$cc" '{#}' '{}' |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
10 } |
7a2bc060230d
first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
25
diff
changeset
|
11 echo $(date) $(hostname) $? |