http://qs321.pair.com?node_id=417182


in reply to Re: Re: (thoughts on) Detect common lines between two files, one liner from shell
in thread Detect common lines between two files, one liner from shell

This should also work for an arbitrary number of files, which AFAIK has no equivalent UNIX command. To show common lines in 4 files: perl -ne 'print if ($seen{$_} .= @ARGV) =~ /32+1+0$/' fileA fileB fileC fileD