The Cisco pipe command is particularly useful when you need to display subsets of rather long configurations or when you need to key in on a particular point in the configuration. The pipe command is put to use by using the pipe symbol following the show command to filter for anything beginning (the "begin" switch) with a certain point in the configuration or including (the "include" switch) certain information. The switches are similar to the Unix file management "head", "tail", and "grep" commands only they produce slightly different results. The begin switch produces configuration output starting with the pipe begin query. The include switch produces configuration output only including the pipe include query. The ouput in either case will produce a line of configuration at a minimum that corresponds to the query. Multiple include queries can be concatenated to filter for several parameters. Below are some examples.
-------------
To show running configurations for interfaces and their associated IP addresses:
show run (pipe) inc interface (pipe) ip address
-------------
To show serial interfaces:
router# show interfaces (pipe) beg Serial
Saturday, June 21, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
very useful! thanks.
Post a Comment