annotate bin/extract.sh @ 187:9805323d9969

add lastmod to cdx lines, start writing test case
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Mon, 23 Sep 2024 16:35:22 +0100
parents 1e479e3ea9c4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
29
a95a1b31f5e9 try to fix multi-line lossage
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 27
diff changeset
3 # First line thereof gives CC identifier
27
7a2bc060230d first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 25
diff changeset
4 echo $(date) $(hostname)
7a2bc060230d first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 25
diff changeset
5 h=$(hostname)
7a2bc060230d first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 25
diff changeset
6 hn=${h##*n}
7a2bc060230d first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 25
diff changeset
7 head -1 extract_${hn}.txt |\
30
1e479e3ea9c4 better quoting
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 29
diff changeset
8 { read cc ; \
29
a95a1b31f5e9 try to fix multi-line lossage
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 27
diff changeset
9 tail -n +2 extract_${hn}.txt |\
30
1e479e3ea9c4 better quoting
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 29
diff changeset
10 parallel --joblog topjob.log --will-cite -j 4 -N 1 \$HOME/bin/doExtract.sh "$cc" '{#}' '{}' ; }
27
7a2bc060230d first cut at doing extraction here
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 25
diff changeset
11 echo $(date) $(hostname) $?