I have a file that contains multiple, very similar lines. How would I read through the file and remove every line in a block, except the very last one?
Example:
Before --- "SimpsonH","Homer","Simpson","NULL","648","0","218 555","Nuclear Contr +ol","Nuclear Operator","SimpsonM" "SimpsonH","Homer","Simpson","NULL","647","0","218 555","Nuclear Contr +ol","Nuclear Operator","SimpsonM" "SimpsonH","Homer","Simpson","NULL","648","0","218 555","Nuclear Contr +ol","Nuclear Operator","BurnsM" "SimpsonB","Bart","Simpson","NULL","748","0","218 555","Springfield El +ementary","Student","SimpsonM" "SimpsonB","Bart","Simpson","NULL","748","0","218 555","Springfield El +ementary","Student","SimpsonH" "SimpsonB","Bart","Simpson","NULL","748","1","218 555","Springfield El +ementary","Student","SkinnerP" After -- "SimpsonH","Homer","Simpson","NULL","648","0","218 555","Nuclear Contr +ol","Nuclear Operator","SimpsonM" "SimpsonB","Bart","Simpson","NULL","748","1","218 555","Springfield El +ementary","Student","SkinnerP"
In reply to Removing multiple lines by rycher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |