<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HandsomePlanet &#187; CLI</title>
	<atom:link href="http://www.handsomeplanet.com/archives/tag/cli/feed" rel="self" type="application/rss+xml" />
	<link>http://www.handsomeplanet.com</link>
	<description>technology and other perplexities</description>
	<lastBuildDate>Mon, 19 Sep 2011 16:22:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>send man page to text file</title>
		<link>http://www.handsomeplanet.com/archives/230</link>
		<comments>http://www.handsomeplanet.com/archives/230#comments</comments>
		<pubDate>Mon, 19 Sep 2011 16:22:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=230</guid>
		<description><![CDATA[Printing a manpage to a text file (perhaps more portable for cross-platform or bedtime reading): generic Unix/Linux, using `col`: man rcs &#124; col -b > /tmp/man_rcs.txt These alternatives would require that you reset PAGER or MANPAGER: alternative BSD : export MANPAGER=cat man pf.conf > man_pf.conf.txt alternative BSD : export PAGER=cat man pf.conf > man_pf.conf.txt Ubuntu, [...]]]></description>
			<content:encoded><![CDATA[<p>Printing a manpage to a text file (perhaps more portable for cross-platform or bedtime reading):</p>
<p>generic Unix/Linux, using `col`:<br />
<code>man rcs | col -b > /tmp/man_rcs.txt</code></p>
<p>These alternatives would require that you reset PAGER or MANPAGER:<br />
alternative BSD :<br />
<code>export MANPAGER=cat</code><br />
<code>man pf.conf > man_pf.conf.txt</code></p>
<p>alternative BSD :<br />
<code>export PAGER=cat</code><br />
<code>man pf.conf > man_pf.conf.txt</code></p>
<p>Ubuntu, Debian, Mint, etc. allow all of these alternatives:</p>
<p><code>       -P pager, --pager=pager<br />
              Specify  which  output  pager to use.  By default, man uses pager -s.  This option overrides the $MANPAGER environment variable, which in turn overrides  the  $PAGER environment variable.  It is not used in conjunction with -f or -k.</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/230/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command line fun for linux : included utilities</title>
		<link>http://www.handsomeplanet.com/archives/226</link>
		<comments>http://www.handsomeplanet.com/archives/226#comments</comments>
		<pubDate>Thu, 13 Jan 2011 20:58:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=226</guid>
		<description><![CDATA[obelix@entity:~$ info util-linux-ng]]></description>
			<content:encoded><![CDATA[<p><code> obelix@entity:~$ info util-linux-ng </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/226/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco 3560, 3750 archive command to install or upgrade IOS via tar file</title>
		<link>http://www.handsomeplanet.com/archives/164</link>
		<comments>http://www.handsomeplanet.com/archives/164#comments</comments>
		<pubDate>Fri, 21 May 2010 19:18:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[CLI]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=164</guid>
		<description><![CDATA[Some newer L3 Cisco switches are now happier if you use the &#8216;archive&#8217; facility to manage images. If you only want the IOS, and not the web interface and so on, use the /imageonly flag. From the Cisco release notes : For example: Switch# archive download-sw /overwrite tftp://198.30.20.19/c3750-ipservices-tar.122-50.SE.tar Check the release notes or command reference [...]]]></description>
			<content:encoded><![CDATA[<p>Some newer L3 Cisco switches are now happier if you use the &#8216;archive&#8217; facility to manage images.<br />
If you only want the IOS, and not the web interface and so on, use the /imageonly flag.<br />
From the <a title="release notes" href="http://origin-www.cisco.com/en/US/docs/switches/lan/catalyst3750/software/release/12.2_53_se/release/notes/OL21141.html">Cisco release notes</a> :<br />
For example:<br />
<span style="font-family: monospace;">Switch# archive download-sw /overwrite tftp://198.30.20.19/c3750-ipservices-tar.122-50.SE.tar</span></p>
<p>Check the release notes or command reference (or in-exec help) for further options.</p>
<p>This apparently does away with &#8216;boot system statements&#8217; as well,  as you can see if you run &#8216;show boot&#8217; on the switches.  The image set by your &#8216;archive&#8217; command becomes the active image on reboot.  I&#8217;m not sure what happens if you have both explicit &#8216;system boot &lt;blah&gt;&#8217; statements and the automatic IOS precedence setting configured via the fancy archive method.<br />
<code><br />
anynode#sh boot<br />
BOOT path-list      : flash:c3750-ipservicesk9-mz.122-53.SE1/c3750-ipservicesk9-mz.122-53.SE1.bin<br />
Config file         : flash:/config.text<br />
Private Config file : flash:/private-config.text<br />
Enable Break        : no<br />
Manual Boot         : no<br />
HELPER path-list    :<br />
Auto upgrade        : yes<br />
Auto upgrade path   :<br />
Timeout for Config<br />
          Download:    0 seconds<br />
Config Download<br />
       via DHCP:       disabled (next boot: disabled)<br />
-------------------<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/164/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux/Unix tools for multiline grep</title>
		<link>http://www.handsomeplanet.com/archives/116</link>
		<comments>http://www.handsomeplanet.com/archives/116#comments</comments>
		<pubDate>Wed, 02 Dec 2009 17:16:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=116</guid>
		<description><![CDATA[grep -A 2 SearchString # find and return SearchString and the two lines after the line that matches grep -B 3 SearchString # find and return SearchString and the three lines before the line that matches also, pcregrep pcregrep -M &#8216;a\nb&#8217; files&#8230;]]></description>
			<content:encoded><![CDATA[<p> grep -A 2 SearchString <file.txt>  # find and return SearchString and the two lines after the line that matches<br />
 grep -B 3 SearchString <file.txt>  # find and return SearchString and the three lines before the line that matches</p>
<p>also,<br />
pcregrep<br />
    pcregrep -M &#8216;a\nb&#8217; files&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/116/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to keep apache from autostarting on system boot for Debian or Ubuntu</title>
		<link>http://www.handsomeplanet.com/archives/110</link>
		<comments>http://www.handsomeplanet.com/archives/110#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:40:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=110</guid>
		<description><![CDATA[An easy way to remove apache2 (or another system service) from the start up scripts in Debian or Ubuntu is to use the update-rc.d mechanism. For instance: # update-rc.d -f apache2 remove The &#8220;-f&#8221; is required if you have existing scripts in /etc/init.d/apache2. If you are planning on manually starting apache, the &#8220;-f&#8221; is [barring [...]]]></description>
			<content:encoded><![CDATA[<p>An easy way to remove apache2 (or another system service) from the start up scripts in Debian or Ubuntu is to use the update-rc.d mechanism.</p>
<p>For instance:</p>
<pre># update-rc.d -f apache2 remove</pre>
<p>The &#8220;-f&#8221; is required if you have existing scripts in /etc/init.d/apache2.   If you are planning on manually starting apache, the &#8220;-f&#8221; is [barring heroic/quixotic effort to create alternatives] a requirement.<br />
Otherwise, in this situation, you will see:</p>
<pre>update-rc.d: /etc/init.d/apache2 exists during rc.d purge (use -f to force)</pre>
<p>A good write-up is here:<br />
<a title="Debuntu.org: How to Manage Services with update-rd.d" href="http://www.debuntu.org/how-to-manage-services-with-update-rc.d"> http://www.debuntu.org/how-to-manage-services-with-update-rc.d</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/110/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 (Karmic) Beta</title>
		<link>http://www.handsomeplanet.com/archives/106</link>
		<comments>http://www.handsomeplanet.com/archives/106#comments</comments>
		<pubDate>Thu, 08 Oct 2009 03:38:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[karmic koala]]></category>
		<category><![CDATA[package management]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=106</guid>
		<description><![CDATA[Instead of &#8216; do-release-upgrade &#8216; as I did with my upgrade to 9.04 , going to the Beta of 9.10 I used update-manager -d No major problems.  I did have to manually remove a couple of ppa entries from my /etc/apt/sources.list.  Also, I changed from the generic &#8216;main server&#8217; to a much, much faster (at [...]]]></description>
			<content:encoded><![CDATA[<p>Instead of &#8216; do-release-upgrade &#8216; as I did with my upgrade to 9.04 , going to the Beta of 9.10 I used</p>
<p>update-manager -d</p>
<p>No major problems.  I did have to manually remove a couple of ppa entries from my /etc/apt/sources.list.  Also, I changed from the generic &#8216;main server&#8217; to a much, much faster (at the time) server.  The easiest way to do this is via gui, as far as I know.  Ubuntu will check for the fastest responding site if you use &#8216;System&#8217; -&gt; &#8216;Administration&#8217; -&gt; &#8216;Software Sources&#8217; and &#8216;Select Best Server&#8217;,&#8217; or use &#8216;Settings&#8217; under the update-manager interface (&#8216;settings&#8217; is on the lower left) to get to the same place.   I shaved off several hours from my package download by switching to a server that had some combination of proximity, light load, and high bandwidth.   This involved a generous amount of luck, and probably the uneven demand associated with a pre-release version of the OS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/106/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>redirecting standard error (stderr) and standard output (stdout) to a file</title>
		<link>http://www.handsomeplanet.com/archives/21</link>
		<comments>http://www.handsomeplanet.com/archives/21#comments</comments>
		<pubDate>Sat, 23 May 2009 22:37:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=21</guid>
		<description><![CDATA[Capturing both errors and normal list output from ls, with &#8220;long&#8221; and recursive options set,  to a file called /tmp/allout : ls -lR &#62; /tmp/allout 2&#62;&#38;1]]></description>
			<content:encoded><![CDATA[<p>Capturing both errors and normal list output from ls, with &#8220;long&#8221; and recursive options set,  to a file called /tmp/allout :</p>
<p>ls -lR &gt; /tmp/allout 2&gt;&amp;1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/21/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>upgrading an Ubuntu server from the command line</title>
		<link>http://www.handsomeplanet.com/archives/12</link>
		<comments>http://www.handsomeplanet.com/archives/12#comments</comments>
		<pubDate>Fri, 08 May 2009 17:43:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=12</guid>
		<description><![CDATA[This is how I upgraded from 8.10 to 9.04 over the network: sudo apt-get install update-manager-core sudo do-release-upgrade [reference : http://www.ubuntu.com/getubuntu/upgrading ]]]></description>
			<content:encoded><![CDATA[<p>This is how I upgraded from 8.10 to 9.04 over the network:</p>
<p>sudo apt-get install update-manager-core<br />
sudo do-release-upgrade</p>
<p>[reference : http://www.ubuntu.com/getubuntu/upgrading ]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/12/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco IOS CLI regular expressions, Part II — ‘AND’</title>
		<link>http://www.handsomeplanet.com/archives/11</link>
		<comments>http://www.handsomeplanet.com/archives/11#comments</comments>
		<pubDate>Thu, 02 Apr 2009 21:25:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=11</guid>
		<description><![CDATA[In an earlier post, I talked about Cisco command line regular expressions, and held off on giving any good examples of using the CLI regexp tools to get ‘AND’ functionality. ( I pointed out there that the ‘&#124;’ (pipe symbol) could be used as a simple ‘OR’ function.) Here are some easy regexp’s that function [...]]]></description>
			<content:encoded><![CDATA[<p>In an earlier <a title="cisco-ios-cli-regular-expressions">post</a>, I talked about Cisco command line regular expressions, and held off on giving any good examples of using the CLI regexp tools to get ‘AND’ functionality. ( I pointed out there that the ‘|’ (pipe symbol) could be used as a simple ‘OR’ function.)<br />
Here are some easy regexp’s that function (more as less) as simple Boolean ‘AND’s.</p>
<p>Here’s a scenario: you’re auditing one of your routers, checking to make sure privilege levels are what they should be for individual users, and that commands that have been moved into non-default privilege levels that appear to be correctly defined.</p>
<p>Here’s the output of ’show running-config’ with only lines that match ‘privi’ included (so as to catch lines that show privilege levels):</p>
<p><code>IOS-rtr#sh run | inc privi</code><br />
<code>username sneezy privilege 0 secret 5 $1$Dz6cKoEINsYusITt.l</code><br />
<code>username dopey privilege 0 secret 5 $1$MIUYWJ.I3iGq/qNleB.</code><br />
<code>username meson privilege 0 secret 5 $1$7uBWyjan.5JB8KHR0</code><br />
<code>username gluon privilege 15 secret 5 $1$VuoC$09dsgXRB.A/d</code><br />
<code>privilege exec level 0 traceroute</code><br />
<code>privilege exec level 0 ping</code><br />
<code>privilege exec all level 0 show</code><br />
<code>privilege exec level 0 clear ip nat translation</code><br />
<code>privilege exec level 0 clear ip nat</code><br />
<code>privilege exec level 0 clear ip</code><br />
<code>privilege exec level 0 clear</code><br />
<code>privilege configure level 7 logging </code><br />
<code>privilege configure level 7 logging trap </code><br />
<code>privilege configure level 7 logging source</code><br />
<code> privilege level 15</code><br />
<code> privilege level 15</code></p>
<p>In this case, you can use the regular expression “.*” (dot-star) to match lines that contain both the word ‘privilege’ and ‘level 0′, thus eliminating other priv levels, as well as username definitions:<br />
<code>IOS-rtr#sh run | inc privi.*level 0</code><br />
<code>privilege exec level 0 traceroute</code><br />
<code>privilege exec level 0 ping</code><br />
<code>privilege exec all level 0 show</code><br />
<code>privilege exec level 0 clear ip nat translation</code><br />
<code>privilege exec level 0 clear ip nat</code><br />
<code>privilege exec level 0 clear ip</code><br />
<code>privilege exec level 0 clear</code></p>
<p>The same thing works for an audit of ‘level 7′ commands:</p>
<p><code>OS-rtr#sh run | inc privi.*level 7</code><br />
<code>privilege configure level 7 logging </code><br />
<code>privilege configure level 7 logging trap </code><br />
<code>privilege configure level 7 logging source</code></p>
<p>If you want to show lines that match privilege levels <em>other</em> than zero, you could use this:<br />
<code>IOS-rtr#sh run | inc priv.*[1-9]</code></p>
<p>You should note that the “.*” (dot-star) regular expression can be used as a synonym for AND, provided that you are aware that “.*” is not order agnostic.<br />
In order to do a true AND, you’d need an expression like :<br />
<code>sh run | inc (privi.*level 0|level 0.*privi)</code><br />
This will match lines containing both ‘privilege’ and ‘level 0′, no matter which of the words appears first. To illustrate this, I’ll create a loopback interface (loop3) with some description text that will match the regex:</p>
<p><code>IOS-rtr#conf t</code><br />
<code>Enter configuration commands, one per line.  End with CNTL/Z.</code><br />
<code>IOS-rtr(config)#int loop3</code><br />
<code>IOS-rtr(config-if)#desc level 0 is not privileged here!</code><br />
<code>IOS-rtr(config-if)#^Z</code><br />
<code>IOS-rtr#sh run | inc (privi.*level 0|level 0.*privi)</code><br />
<code> description level 0 is not privileged here!</code><br />
<code>privilege exec level 0 traceroute</code><br />
<code>privilege exec level 0 ping</code><br />
<code>privilege exec all level 0 show</code><br />
<code>privilege exec level 0 clear ip nat translation</code><br />
<code>privilege exec level 0 clear ip nat</code><br />
<code>privilege exec level 0 clear ip</code><br />
<code>privilege exec level 0 clear</code></p>
<p>It works!   Notice that we caught both the description line and the privilege exec lines.</p>
<p>Apparently I’m easily amused, but there it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/11/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cisco IOS CLI regular expressions (&#8220;Ceci n&#8217;est pas une pipe.&#8221;)</title>
		<link>http://www.handsomeplanet.com/archives/7</link>
		<comments>http://www.handsomeplanet.com/archives/7#comments</comments>
		<pubDate>Tue, 31 Mar 2009 15:09:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=7</guid>
		<description><![CDATA[[taken from a  note originally written March 2007] Yesterday, I was trying to find a method to implement an  ‘AND’ function within the Cisco IOS cisco command line.  I was familiar with the  ‘OR’ function available through the ‘&#124;’ symbol (which is to say, the same symbol as the pipe). For example, if you wanted [...]]]></description>
			<content:encoded><![CDATA[<address>[taken from a  note originally written March 2007]<br />
</address>
<p>Yesterday, I was trying to find a method to implement an  ‘AND’ function within the Cisco IOS cisco command line.  I was familiar with the  ‘OR’ function available through the ‘|’ symbol (which is to say, the same symbol as the pipe).</p>
<p>For example, if you wanted to show the running config, and filter out lines that contained either ‘foo’ or ‘bar’, you could type</p>
<p><code>show run | include foo|bar</code></p>
<p>The second &#8220;pipe,&#8221;  in this case, isn’t a pipe, but the symbol for an ‘OR’ function.  (&#8220;Ceci n&#8217;est pas une pipe.&#8221;)</p>
<p><a href="http://en.wikipedia.org/wiki/The_Treachery_of_Images"><img class="size-full wp-image-35 alignright" title="300px-magrittepipe" src="http://www.handsomeplanet.com/wp-content/uploads/2009/03/300px-magrittepipe.jpg" alt="Magritte -- this (pipe) is not a pipe" width="300" height="230" /></a></p>
<p>I wasn’t able to find a way to do an ‘AND’ in an analogous fashion, but I  did find a decent Cisco webpage on CLI and regular expressions (regexp) that helped a bit. That page can be found here: <a title="http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t1/cliparse.htm" onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t1/cliparse.htm" target="_blank">http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t1/cliparse.htm </a></p>
<p>It is possible to do ‘AND’ type functions implicitly by using a more complex set of matching rules based on regular expressions.</p>
<p>Here’s a example that shows (from an interactive session on the Cisco CLI) if access-lists have been applied to interfaces using the &#8220;access-group&#8221; command:</p>
<p><code>sh run | include (^interface [A-Z])|(ip access-group [0-9a-zA-Z])</code></p>
<p>Lines that start with ‘interface’ followed by an uppercase letter (the expression matches anything in the range A-Z) are supposed to match things like ‘interface Fastethernet,’ ‘interface Serial’ and so on. The second part of the expression matches access-groups that have three possible initial character ranges: a lowercase letter (a-z), an uppercase letter (A-Z), or a number (0-9) for the standard access lists.<br />
Some rudimentary filtering is done, so things like Loopback sourcing, route-maps, and so on, don’t match.</p>
<p>Interfaces that have no access-lists applied have on the interface name listed, but interfaces with an access-group command show the complete access-group statement under the relevant interface (which makes sense, given that this is only a filtered ’show run’).</p>
<p>Output might look something like this:</p>
<p><code>interface Serial3/3<br />
interface Serial3/3.1 point-to-point<br />
ip access-group pac in<br />
ip access-group ket out<br />
interface FastEthernet4/0<br />
interface Serial6/0<br />
ip access-group Ozona in</code></p>
<p>If this kind of function is useful for you, it is even easier to use if you put it in an alias on your switch or router:</p>
<p><code>#conf t<br />
#alias exec shag sh run | include (^interface [A-Z])|(ip access-group [0-9a-zA-Z])</code></p>
<p>You should, of course, pick a name for the alias that you’ll remember.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

