I used the following syntax in order to find the IP address under /etc (answered by Dennis Williamson on the Super User site), but I get the message
grep: line too long
How can I get it to ignore this message and continue searching other IP addresses because the message that I get stop the IP addresses searching (maybe because binary of files?) -:(
grep -Er '\<([0-9]{1,3}\.){3}[0-9]{1,3}\>' /etc/ grep: line too long Is there a solution for this problem? Maybe somthing that replaces the grep?
2 Answers
Some of the files in your /etc/ then contain VERY long lines without linebreaks, so grep skips them.
You can try ack instead. With it the syntax would be
ack -r '\<([0-9]{1,3}\.){3}[0-9]{1,3}\>' /etc/
The target of the grep search probably should be /etc/hosts (i.e. not /etc/)...