in reply to Delete lines as i read them

Don't.

Create a new file (name.new) containing whatever records should not be 'deleted'. Upon completion, rename it to name.old, and (if successful), rename name.new to name.

In this way, you also have an audit trail...