9ad233e ^
425c822 ^
1 2 3 4 5 6 7
8 9
10 11 12 13 14 15 16 17 18
#!/usr/bin/awk -f function abs(n) { return n < 0 ? -n : n } { xs[NR] = $1 ys[NR] = $2 } END { asort(xs) asort(ys) for (i in xs) d += abs(xs[i] - ys[i]) print d }