In the log, I want to know all the lines contains an IP address, and to exclude the content contains a string or a number of lines, how to write a regular expression to search out in egrep? thank you
CodePudding user response:
?????
Egrep IP address - v out content log file
CodePudding user response:
reference 1st floor chaos_oper response: ??????? Egrep IP address - v out content log file No, this should be or operation, and I want to operate CodePudding user response:
Egrep [IP address] | egrep -v [0-9] | egrep -v [?! \. \ * :,,] the filename because you didn't speak very clearly what you need, also not sure you speak, this is a ballpark, CodePudding user response:
Well yesterday, their experiment out also can only be separated by pipeline operators to do the same as the basic upstairs egrep 'IP address' file name | egrep -v 'digital' CodePudding user response:
Grep "192.168.11.22" - A 10 a. og | grep -v "XXX"