How to compare two large files using perl? Using grep is very slow on large files. eg: less file1 |grep -f file2 > file3 eg: content in file1: 123;456;789 234;567;890 789;345;123 context in file2: 345 123 file3 output: 123;456;789 789;345;123 How to get the same output faster?
difforcmp. - Nedlesswithcatif you simply want to feed the contents offile1to the standard input ofgrep. - Ned