Remove Corrupted Records in the file

Hi All,

Please help me with the below query. I need to delete the bad records in the file and have to save the file after deleting them. Thanks in advance.

Ex:
-----
I have a file called ABC and the data in the file is as follows.

08XS021642525520110830BBSBI              99.9375                 100           .28521415                 .26                   020110830075937                   0
08XS021811173920110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS021811319820110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08USG3603GAD4620110830BBSBI                  100                 100                                                           020110830075937                   0
08XS022341103320110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022341154620110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022341189220110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022456431920110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022307088820110830BBSBI             99.96875           100.03125                                                           020110830075937                   0

So here I have to go through this file and search for Interpreter and if any results for that then I have to delete the entire line. So my output should be like this.

Output:
-----------

08XS021642525520110830BBSBI              99.9375                 100           .28521415                 .26                   020110830075937                   0
08XS021811173920110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS021811319820110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022341103320110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022341154620110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022341189220110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022456431920110830BBSBI             99.96875           100.03125                                                           020110830075937                   0
08XS022307088820110830BBSBI             99.96875           100.03125                                                           020110830075937                   0

Hi,

I don't understand what 'search for Interpreter' means? Can you describe it?

How to know which records are corrupt?

Regards,
Birei

same here....
does "corrupt" mean $2==$3==100?

Hi Birei,

Thanks. Bad records will always contain the word "Interpreter" in it. So I came to a conclusion if we can grep for this like grep Interpreter, then we can remove that entire line from the file. If you any other better alternative also, please suggest the same.

man,in your example, there is no Interpreter at all.

if you want to filter out the lines containing certain word, e.g. "interpreter" you can try

grep -v
printf "/ 100 100 /d\nw\nq\n" | ed -s yourfile

... but would require a loop

or

printf ",s/^.*[[:blank:]]*100[[:blank:]]*100.*//g\nw\nq\n" | ed -s yourfile

but would leave empty lines