how to delete a line from a file

if i have a file i am reading from for example
A 3.0 5
B 2.1 2
..
if i want to delete line b if the int 2 reaches zero how can it be done?
Copy the file. Don't copy the lines that you want deleted. Delete the original file. Rename the new file to match the name of the original.
thank you so much.
Topic archived. No new replies allowed.