annotate bin/doS2T.sh @ 154:2643a6825f17

instead of csv
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 17 Nov 2021 18:26:33 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
154
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 #!/usr/bin/bash
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 # Usage: doS2T.sh node task cc resdir segs workd dbfile
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3 node=$1
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4 task=$2
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5 cc=$3
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6 resdir=$4
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7 segs=$5
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8 workd=$6
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 dbfile=$7
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 f=${dbfile%.db}
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12 i=${f#*cdx}
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14 echo "> $node.$task: $segs $i"
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
16 sqlite3 $dbfile ".mode tabs" ".once $workd/$i.tsv" "select count(*),* from props group by segment,ftype,https,nlangs" ".quit"
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
17
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
18 echo "< $node.$task: $segs $i";
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
19
2643a6825f17 instead of csv
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
20