That is a variation of the grep exercise. Check this thread for further examples. (The main difference between your task and the other one is negation of printing sense. Btw, the grep -v option only negates matching sense and so grep -v -A1 -B1 can not be used for your purposes.)
In reply to Re: how to check for a word in a file and if found remove that line, the above line and the below line from the file.
by oiskuu
in thread how to check for a word in a file and if found remove that line, the above line and the below line from the file.
by Ganesh Bharadwaj1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |