Experts Hi,
I wish to remove lines containing the following strings from a file hello.out and save it in new_hello.out file.
1. text4
2. text5
3. text11
4. file13
5. file15
6. text16
The below works however, is it possible to club all the grep -v into a single grep -v ?
cat hello.out | grep -v text4 | grep -v text5 | grep -v text11 | grep -v text16 | grep -v file13 | grep -v file15 > new_hello.out
I'm aware of of using grep -E
and clubbing multiple strings however I'm not sure of grep -v
I'm on Redhat Linux 7.