diff options
-rwxr-xr-x | dif | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,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" |