grep is a command line tool which can be used to search for patterns within files. As opposed to regular search tools which search for specific strings, grep searches for patterns (using regular expressions) and can oftentimes be much more useful for things like log analysis and data extraction. By: Moshe Caplan

Use the presentation slides to put together a pattern that will match all the IP addresses in a file. Then use your pattern to create a grep command to extract all the IP addresses from the file "dataFileForGrep", found below.

 

Answers:
192.168.1.100
127.0.0.1
24.27.121.76
168.58.65.127
10.0.0.7

dataFileForGrep(149 bytes) marcbudofsky, Mar 17 2013, 9:42 PM

Further information on this module can be found at the following links. 


You must Sign-In to post a comment.