I'm trying to extract the identical content from two text files.
For example:
first file:
1
2
3
4
second file:
4
5
6
7
I should return '4'.
I'm trying to use grep in bash file to read lines from first file and search on second. But this method is very slow. Please help to find another fastest way to complete this task with using RAM.
Thanks.