1: delete the line that has loghost from /etc/hosts (ignoring comments) and save to /tmp/myout.$$ 2: delete line number 3 from /tmp/myout.$$ 3: print to stdout lines 3-7 from /etc/hosts (ignoring comments) 4: join lines in /etc/hosts (line 1&2, 3&4, ...) so they print as a line and delete any comment lines 5: read the the /etc/hosts (like number 4) and look for loghost, assign the IP to a variable then print the variable 6: do a "vmstat 1 10" and get the sum, min, max, and average for each column using awk 7: use awk and join the output of an "ipconfig -a" on cannes, this will put the interface (hme0:1) with the IP (10.1.1.x) extra Try number 7 and look for a specific IP address Print fields from field x to end of line Remove preceeding and trailing spaces in string Remove all spaces in string