blob: 4d348236cb29876fd0cfc3a80fc1b0f35001919e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/sh
# dif -- print differences between two typ result files
awk -vn=`wc -l "$1" | cut -d\ -f1` '
NR <= n {
v[FNR] += $1
$1 = ""
sub(/^ /, "", $0)
t[FNR] = $0
}
NR > n {
printf("%.4f\t%s\n", v[FNR] - $1, t[FNR])
}' "$1" "$2"
|