Comparing two files

Hi

I have two files X and Y. I have to compare two files and dispaly the lines which are present in X and not in Y along with the line numbers

ex

X Y

a a
b b
c g
e

output Z

  1. c

Thanks

This is a vague question and smells like homework. If it isn't, what is the "real world problem" of your question and what have you done to attempt to solve this problem yourself? Post your sample script, and we'll see how we can assist.

Regards

Try diff or sdiff