Answer the question
In order to leave comments, you need to log in
Delete rows that do not contain a specific value?
There was a need to delete all lines from 10 files that do not contain uk.html?subid=adwords
What is the best way to do this? Plain text files, in UTF-8
Answer the question
In order to leave comments, you need to log in
single file:
all files in directory:
ls /path/to/dir/* | while read file; do sed -i '/uk.html?subid=adwords/!d' "${file}"; done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question