Sometimes we need to ignore multiple lines with certain words and get the list out of the file. usually it will be a log file to read . The below grep command can be used to ignore multiple words present in a text file. Lets say the file contain $ cat list.txt apple orange apple banana papaya Now we need to ignore line with orange , banana and papaya . So we can use the below grep command. $ cat list.txt | grep -Ev "orange|banana|papaya" apple apple It will ignore lines with the words in -v part of grep.
A technology and programming blog to share knowledge and solutions to problems came across
ReplyDeleteThanks for any other magnificent post. The place else may just anybody get that type of info in such an ideal means of writing? I've a presentation subsequent week, and I'm on the look for such info. gmail login email