aboutsummaryrefslogtreecommitdiff
path: root/testdir/Compare.tt
blob: 4b297d731c94610abab61c25f9b5ae660786dea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh

oldawk=${oldawk-awk}
awk=${awk-../a.out}

echo compiling time.c
cc time.c -o time
time=./time

echo time command = $time

#case `uname` in
#SunOS)
#	time=/usr/bin/time ;;
#Linux)
#	time=/usr/bin/time ;;
#*)
#	time=time ;;
#esac

echo oldawk = $oldawk, awk = $awk, time command = $time


# an arbitrary collection of input data

cat td.1 td.1 >foo.td
sed 's/^........................//' td.1 >>foo.td
pr -m td.1 td.1 td.1 >>foo.td
pr -2 td.1 >>foo.td
cat bib >>foo.td
wc foo.td

td=foo.td
>footot

for i in $*
do
	echo $i "($oldawk vs $awk)":
	# ind <$i
	$time $oldawk -f $i $td >foo2 2>foo2t
	cat foo2t
	$time $awk -f $i $td >foo1 2>foo1t
	cat foo1t
	cmp foo1 foo2
	echo $i: >>footot
	cat foo1t foo2t >>footot
done

ctimes footot