Joseph Herlant
version 1.0.0, 2013-10-19 : Initial version

1. Extracting lines conmmon in 2 files

This shell command returns all lines that are exactly the same in 2 given files.

Note that this command has been posted by Randal Schwartz on PerlMonks.

perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' file_1.txt file_2.txt

2. Extracting lines conmmon in 3 files

This shell command returns all lines that are exactly the same in 3 given files.

perl -ne 'print if ($seen{$_} .= @ARGV) =~ /210$/' file_1.txt file_2.txt file_3.txt