need help ...

Hi,

I have two files file1, file2. Now I want to display records of file1 those are in file2
-------i/p-------
file1
08821 09440
08813 09848
08812 09940
040 09940
0411 09940

file2
08812
040

----out put----
08812 09940
040 09940

Suresh;)

Depending on if your file2 has other stuff in it besides the values you're trying to compare, you could just do something like this:

grep -f file2 file1

that will use file2 as a file of patterns to search for in file1