<?xml version="1.0"?>
<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/"
	>
   <channel>
      <pubDate>Thu, 4 Dec 2008 05:07:06 GMT</pubDate>
      <lastBuildDate>Thu, 4 Dec 2008 05:07:06 GMT</lastBuildDate>
      <language>en</language>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <title>CrunchBang ~ cli</title>
      <link>http://crunchbang.org/tags/cli/</link>
      <description>Code, Design &amp; GNU/Linux</description>

<item>
    <title>rpl - A Find &amp; Replace Terminal Tool</title>
    <link>http://crunchbang.org/archives/2008/04/20/rpl-a-find-and-replace-terminal-tool/</link>
    <pubDate>Sun, 20 Apr 2008 02:34:48 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2008/04/20/rpl-a-find-and-replace-terminal-tool/</guid>
    <description><![CDATA[
    <p>Tonight I have mainly been working on <a href="http://crunchbang.org/projects/whird/ " title="Project page for Whird.">Whird</a>. I have been rewriting large chunks of code in an effort to optimise a bunch of functions. As a result of this, I had to change a series of strings in a number of files. As per normal when it comes to fiddly <a href="http://en.wikipedia.org/wiki/Grep " title="Wikipedia - grep">grep</a>, <a href="http://en.wikipedia.org/wiki/Sed " title="Wikipedia - sed">sed</a> and <a href="http://en.wikipedia.org/wiki/Awk " title="Wikipedia - awk">awk</a> commands, I fired up Google and searched for some pointers. Whilst refreshing my memory, I came across a comment by an anonymous reader who suggested using the <code>rpl</code> command.</p>

<p>I had not previously come across <a href="http://www.laffeycomputer.com/rpl.html " title="rpl - Replace Strings - from Laffey Computer Imaging">rpl</a> before, so I investigated. Turns out that rpl is a really handy text replacement tool &#8212; it makes recursive text replacement commands really simple; as simple as:</p>

<pre><code>rpl [options] old_string new_string target_file(s)
</code></pre>

<p>Available options are:</p>

<pre><code>--version          show program's version number and exit
-h, --help         show this help message and exit
-L, --license      show the software license
-x SUFFIX          specify file suffix to match
-i, --ignore-case  do a case insensitive match
-w, --whole-words  whole words (old_string matches on word boundaries only)
-b, --backup       make a backup before overwriting files
-q, --quiet        quiet mode
-v, --verbose      verbose mode
-s, --dry-run      simulation mode
-R, --recursive    recurse into subdirectories
-e, --escape       expand escapes in old_string and new_string
-p, --prompt       prompt before modifying each file
-f, --force        ignore errors when trying to preserve permissions
-d, --keep-times   keep the modification times on modified files
-t, --use-tmpdir   use $TMPDIR for storing temporary files
-a, --all          do not ignore files and directories starting with .
</code></pre>

<p>rpl is available to install from the <a href="http://packages.ubuntu.com/search?searchon=names&amp;keywords=rpl " title="Ubuntu Packages - rpl">Ubuntu repositories</a>, install with the following command:</p>

<pre><code>sudo apt-get install rpl
</code></pre>

<p>For more information about rpl, see: <a href="http://www.laffeycomputer.com/rpl.html " title="rpl - Replace Strings - from Laffey Computer Imaging">http://www.laffeycomputer.com/rpl.html</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/cli/" title="Browse all posts tagged with &#8220;cli&#8221;">cli</a>, <a href="http://crunchbang.org/tags/commands/" title="Browse all posts tagged with &#8220;commands&#8221;">commands</a>, <a href="http://crunchbang.org/tags/software/" title="Browse all posts tagged with &#8220;software&#8221;">software</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a>, <a href="http://crunchbang.org/tags/whird/" title="Browse all posts tagged with &#8220;whird&#8221;">whird</a></p>
    ]]></description>
</item>

<item>
    <title>Configure Wireless on the Command Line</title>
    <link>http://crunchbang.org/archives/2007/12/18/configure-wireless-on-the-command-line/</link>
    <pubDate>Tue, 18 Dec 2007 23:06:13 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/12/18/configure-wireless-on-the-command-line/</guid>
    <description><![CDATA[
    <p>Today I have mainly been attempting to create a very light installation of <a href="http://www.ubuntu.com/ " title="Ubuntu, Linux for Human Beings!">Ubuntu</a> on an old Pentium III. I started by installing a base system with the Ubuntu alternative install disk. After the base system was installed I then tried to configure my wireless card from the command line. I was half expecting this to be a difficult task, however it wasn&#39;t actually too difficult and thanks to some rather <a href="http://www.stoltenow.com/archives/2006/12/ubuntu_configur.html " title="Ubuntu: Configure Wireless From The Command Line">nifty instructions</a> I managed to get my wireless card working in no time. For future reference here are the necessary commands:</p>

<p><strong>1.</strong> Turn the interface on with the following command:</p>

<pre><code>sudo ifconfig wlan0 up
</code></pre>

<p><strong>2.</strong> Scan for a list of all the available access points:</p>

<pre><code>iwlist wlan0 scanning
</code></pre>

<p><strong>3.</strong> Select the access point with the following command:</p>

<pre><code>sudo iwconfig wlan0 essid ACCESSPOINT
</code></pre>

<p><strong>4.</strong> Set WEP or WPA passphrase, if needed:</p>

<pre><code>sudo iwconfig wlan0 key PASSPHRASE
</code></pre>

<p><strong>5.</strong> Finally, connect to DHCP server and obtain an IP address:</p>

<pre><code>sudo dhclient
</code></pre>

<p>I&#39;ll post more details about the actual system install when I get more time, for now I just wanted to get these instructions down in case I end up having to start again from scratch.</p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/cli/" title="Browse all posts tagged with &#8220;cli&#8221;">cli</a>, <a href="http://crunchbang.org/tags/networking/" title="Browse all posts tagged with &#8220;networking&#8221;">networking</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

<item>
    <title>CPU Temperature via Terminal</title>
    <link>http://crunchbang.org/archives/2007/09/24/cpu-temperature-via-terminal/</link>
    <pubDate>Mon, 24 Sep 2007 10:52:50 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/09/24/cpu-temperature-via-terminal/</guid>
    <description><![CDATA[
    <p>Enter the following command in your Linux terminal to get the current running temperature of your CPU.</p>

<pre><code>acpi -t
</code></pre>

<p>This is a handy command and one that I should be able to put to good use. My desktop is a little bit old and crusty and is forever overheating in the summer. It should be possible to use this command in conjunction with cron to set-up a warning system to let me know when my system is about to go into meltdown.</p>

<p>via the <a href="http://ubuntuforums.org/showpost.php?p=2540421&amp;postcount=1 " title="More useful terminal commands">Ubuntu Forums</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/cli/" title="Browse all posts tagged with &#8220;cli&#8221;">cli</a>, <a href="http://crunchbang.org/tags/commands/" title="Browse all posts tagged with &#8220;commands&#8221;">commands</a>, <a href="http://crunchbang.org/tags/linux/" title="Browse all posts tagged with &#8220;linux&#8221;">linux</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a></p>
    ]]></description>
</item>

 </channel>
</rss>