Mercurial > hg > cc > cirrus_home
annotate bin/doS2C.sh @ 197:78d9e09e151e
withdrew non-working -m switch
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Wed, 23 Apr 2025 11:04:53 +0100 |
| parents | 0072e4ee6c67 |
| children |
| rev | line source |
|---|---|
|
152
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
1 #!/usr/bin/bash |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
2 # Usage: doS2C.sh node task cc resdir segs workd dbfile |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
3 node=$1 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
4 task=$2 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
5 cc=$3 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
6 resdir=$4 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
7 segs=$5 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
8 workd=$6 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
9 dbfile=$7 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
10 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
11 f=${dbfile%.db} |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
12 i=${f#*cdx} |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
13 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
14 echo "> $node.$task: $segs $i" |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
15 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
16 sqlite3 $dbfile ".mode csv" ".once $workd/$i.csv" "select count(*),* from props group by segment,ftype,https,nlangs" ".quit" |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
17 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
18 echo "< $node.$task: $segs $i"; |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
19 |
|
0072e4ee6c67
use sqlite3 just to tabulate
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff
changeset
|
20 |
