October 2008

Extracting log file contents, with sed and awk.

Posted by Ryan on October 28, 2008 in Linux, Solaris

Extract data from a file that contains a list of information. Lets say I have a logfile /tmp/logfile that contains hostnames in the following format (See below). All I want is the hostname, nothing else.  Typing grep and the hostname will return the entire line that contains that hostname.  However using sed, awk, [...]