how could we compare lines in two files using a shell script.
I want to compare line in one file with the line in other.diff will give me all the differences in two files at a time.i want a line in the first file to be compared with all the lines in the second file and get the common lines as the output. with the line numbers where the lines are present in the second file.
I am not sure exactly what you are asking, but how about:
This will give you the numbered lines in FILE2 that do not contain the 1st line in FILE1.