On 11/12/2016 12:24 AM, 積丹尼 Dan Jacobson wrote: > Please add a comm --print-summary and --quiet, so we wouldn't have to write > $ comm FILE1 FILE2|perl -nwe ' > /^\t+/; > $h{ length $& || 0 }++; > > END { > @L = ( "Lines in 1st ", "Lines in 2nd ", "Lines in both" ); > printf "%s: %5d\n", $L[$_], $h{$_} for sort keys %h; > } > ' > Lines in 1st : 601 > Lines in 2nd : 437 > Lines in both: 2417
This sounds like a domain of diffstat(1), doesn't it? Have a nice day, Berny