Exclude unwanted string from Linux grep

Gabriel9999

Member
Joined
Mar 12, 2019
Messages
38
Reaction score
4
Credits
130
I have a configuration file which is a simple text. I want to list some configuration line but except some sitring. How can I use Linux grep to exclude and search for given strings? Thanks in advance for your help!
 


Moving this to Command Line Gabriel

Good luck

Wizard
 
Use grep -v
Code:
$ echo -e 'abcd\nefgh'
abcd
efgh
$ echo -e 'abcd\nefgh' | grep -v bc
efgh
 

Members online


Top