If I am on linux , I use the " grep -v " command to list all the lines that do not contain the pattern and then I direct the output that I am getting to the same file to overwrite it.
something like ,
How can I do this on a windows system?Code:grep -v "$pat" $file > $file
PS: sorry , I should have posted this in the windows board