|
Help Needed in Grep Command
Hi
i am using grep command to search a string in a file and i am able to find that string in it ..
but moving forward once i find the string i need to remove the 5 lines above that and to remove 2 lines below it .. Just wanted to be clear there should be no lines existing which has a string coys11
Example :
file1.txt
cat435
gggte
werwr
coys11
ewrer
when i run this script , it should delete all the lines above it and lines below it
Thanks.. Please do help me on this .. Thanks again..!!
|