delete the lines from file

i have two files & want to delete the lines from 2nd file which matches with 1st file

Try using the comm command. Check the man page for details on which switch to use.

You can do a diff and then write these records into a new file and delete file2.
then rename it to file2. U need some minor tweaking for this to work.

However, for this the File 1 must be a Master file. It should always contain all the records which could be present in the file2.