#!/usr/bin/ksh nawk ' { if ($1 in counts && $2-counts[$1] > 0 ) { printf("%-40.40s %10d\n", $1, $2 - counts[$1]); } counts[$1] = $2; } ' $*