File: finalize

package info (click to toggle)
dbacl 1.12-2.2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,740 kB
  • sloc: ansic: 16,594; sh: 7,963; makefile: 244; yacc: 167; lex: 78; awk: 24; xml: 17; perl: 8
file content (21 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
W=$PWD

if ! cmp -s $W/stderr.log $W/share/dbacl/TREC/verify-stderr ; then
    echo "There were errors during the simulation. See stderr.log below:"
    cat $W/stderr.log
    exit 1
fi

echo "The simulation appears to have run successfully:"

for f in ham spam ; do
	DOCS=`head -3 $W/db/$f | tail -1 | sed 's/.*documents //'`
	TOKS=`head -3 $W/db/$f | tail -1 | sed 's/.*_features //;s/ documents.*//'`
	SIZ=`du -h $W/db/$f`
	
	echo -e "$SIZ\thas learned $DOCS documents,\t$TOKS tokens."
done


exit 0