AIX delete records

Hi,

I have a file which has many lines.
Why loading using sqlloader , it has some bad records and failed.
So i need to remove the bad records only from the main file.
eg.
File.txt
line1
line2
line3
line4
line n

Badfile.txt
line2
line4

Output is : file.txt
line1
line3
line n

This is in AIX unix. Kindly advice.

Thanks
LVL 5
magentoAsked:
Who is Participating?
 
ozoCommented:
grep -vxFf Badfile.txt File.txt
0
 
omarfaridCommented:
if you want to send output to file.txt then

grep -vxFf Badfile.txt File.txt > file.txt
0
 
magentoAuthor Commented:
Works like charm , thank you Ozo .
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.