4

Working with columns - awk and sed

view full story
linux-howto

http://unix.stackexchange.com – I am trying to parse a text file that is generated by an expec script that pulls down some information from a switch. Here is a sample output: 192 0000.0000.0000 1/g23 Dynamic 192 0000.0000.0000 ch1 Dynamic 192 0000.0000.0000 ch1 Dynamic 192 0000.0000.0000 ch1 Dynamic The text file has a lot of other junk in it that I am not interested in. I only want the lines that contain the switch number and the port - "1/g23" in the example above. I did a grep on the file to extract the (HowTos)