What do we grep for in each of the following commands?:
- grep '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' some_file
- grep -E "error|failure" some_file
- grep '[0-9]$' some_file
Answer
- An IP address
- The word "error" or "failure"
- Lines which end with a number