Need to remove certain records off a file.

view story

http://www.unix.com – New to unix. I have a couple files of 5 million records. I have a key field on those records. I have about 300 keys that I need to remove off the file, and I don't want to write a program to do it. I have used grep -v in the past and that works great for a few records, but I can't see myself having to do that 300 times/file. Is there an easier way using grep, egrep, sed/awk, etc.... that I remove this records quickly. The file layout is simple: H00012345 The key starts in position 5. of the file. In this example, I would need to remove 12345 from the file of 5 million records. (HowTos)