Mercurial > hg > cc > azure
annotate workers/bin/_fixAndMerge.sh @ 30:9275e2a8b5e2
hacking to get id into wbash.sh, maybe buggy?
| author | Henry S. Thompson <ht@markup.co.uk> |
|---|---|
| date | Mon, 19 Nov 2018 18:32:30 +0000 |
| parents | 2bde174fe9e2 |
| children | 4c117ee8ed75 |
| rev | line source |
|---|---|
| 25 | 1 #!/bin/bash |
|
27
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
2 # Usage: [cat remote filenames] | _fixAndMerge.sh id home pause log |
| 25 | 3 id=$1 |
| 4 home=$2 | |
| 5 pause=$3 | |
|
27
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
6 log=$4 |
| 25 | 7 # Don't all start at once |
| 8 sleep $pause | |
|
27
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
9 echo \#.$id $(date) starting >> $log |
|
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
10 cat > /var/data/in$id |
|
29
2bde174fe9e2
as used for mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents:
27
diff
changeset
|
11 echo \#.$id $(date) got list $(wc -l /var/data/in$id) >> $log |
|
2bde174fe9e2
as used for mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents:
27
diff
changeset
|
12 rm -f /var/data/d$id |
|
2bde174fe9e2
as used for mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents:
27
diff
changeset
|
13 xargs -n 100 _doFetch.sh "$@" < /var/data/in$id >/var/data/d$id |
|
2bde174fe9e2
as used for mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents:
27
diff
changeset
|
14 echo \#.$id $(wc -l /var/data/d$id) |
|
27
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
15 echo \#.$id $(date) got data >> $log |
|
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
16 fixDates.py < /var/data/d$id |
|
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
17 echo \#.$id $(date) done >> $log |
|
dd19cf97b6dd
attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents:
25
diff
changeset
|
18 |
