hi guys,
i have two files as
fileA
1
2
3
4
fileB
8
9
1
4
how can i find the common value in those two files
output
1
4
thanks in an advance.
subhendu
hi guys,
i have two files as
1
2
3
4
8
9
1
4
how can i find the common value in those two files
1
4
thanks in an advance.
subhendu
To find the common lines in two files
1) If the files are small you can use
grep -f file1 file2
2) If the files are big then sort both the files then
comm -12 file1 file2