<?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>Code Comments &#187; Linux</title>
	<atom:link href="http://code.hammerpig.com/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://code.hammerpig.com</link>
	<description>Tips and short tutorials on various programming technologies</description>
	<lastBuildDate>Fri, 23 Dec 2011 23:09:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Peek at Top, Middle, or Bottom of Text File Without Opening It in Linux</title>
		<link>http://code.hammerpig.com/peek-top-middle-bottom-file-opening-linux.html</link>
		<comments>http://code.hammerpig.com/peek-top-middle-bottom-file-opening-linux.html#comments</comments>
		<pubDate>Tue, 11 Oct 2011 20:01:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=725</guid>
		<description><![CDATA[Let&#8217;s say you have a really large text file. By large, I mean it has a lot of lines of text in the file. I frequently work with files that have millions or billions of lines of text in them. If I try to open the file in a text editor, it usually takes a [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/peek-top-middle-bottom-file-opening-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to echo a Tab or Other Special Characters in Linux</title>
		<link>http://code.hammerpig.com/echo-tab-special-characters-linux.html</link>
		<comments>http://code.hammerpig.com/echo-tab-special-characters-linux.html#comments</comments>
		<pubDate>Thu, 04 Aug 2011 21:09:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=700</guid>
		<description><![CDATA[I&#8217;m working on a bash script that I want to insert some text into a file. So I&#8217;m using the echo command to do this, like so:

echo &#8220;hello, world&#8221; &#62; myfile.txt

This works just great. Now I want to insert a special character into the file. So I need to do two things: 1) escape special [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/echo-tab-special-characters-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate a Random String in Linux</title>
		<link>http://code.hammerpig.com/generate-random-string-linux.html</link>
		<comments>http://code.hammerpig.com/generate-random-string-linux.html#comments</comments>
		<pubDate>Mon, 18 Jul 2011 19:46:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=698</guid>
		<description><![CDATA[It&#8217;s not too hard to generate a random number at the command line in Linux. You can use $RANDOM. But if you want to generate a random string, it is a bit more obscure. The best solution I found (after searching for longer than expected) was the following:

openssl rand -base64 30

This technique uses the openssl [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/generate-random-string-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Extract Substring in Bash</title>
		<link>http://code.hammerpig.com/extract-substring-bash.html</link>
		<comments>http://code.hammerpig.com/extract-substring-bash.html#comments</comments>
		<pubDate>Wed, 29 Jun 2011 15:37:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=689</guid>
		<description><![CDATA[Let&#8217;s say you have a bash variable:

x=abc123def

And you want to get everything in the substring that comes before &#8220;def.&#8221; You can use awk to do this, but it&#8217;s a bit &#8220;awk&#8221;ward (though very flexible and powerful in general). An easy solution is to do the following:

y=${x%def*}
echo $y # Should print &#34;abc123&#34;

This approach should work on [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/extract-substring-bash.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Splitting a String into Array and Accessing Contents by Index in bash</title>
		<link>http://code.hammerpig.com/splitting-string-array-accessing-contents-index-bash.html</link>
		<comments>http://code.hammerpig.com/splitting-string-array-accessing-contents-index-bash.html#comments</comments>
		<pubDate>Tue, 28 Jun 2011 22:26:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=687</guid>
		<description><![CDATA[Say you have a variable in a bash script that looks like this:

x=&#34;abc_123_def&#34;

Now say you want to split this variable into an array. The character you will use to split it is the underscore (_). So you want to end up with an array of three objects: abc, 123, and def. Then you want to [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/splitting-string-array-accessing-contents-index-bash.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Suppress Error Message When Attempting to Recreate Directory in Linux</title>
		<link>http://code.hammerpig.com/suppress-error-message-attempting-recreate-directory-linux.html</link>
		<comments>http://code.hammerpig.com/suppress-error-message-attempting-recreate-directory-linux.html#comments</comments>
		<pubDate>Fri, 11 Feb 2011 17:37:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=668</guid>
		<description><![CDATA[Let&#8217;s say you have a script that creates a directory as a preliminary step to some type of task that you are performing. If the directory doesn&#8217;t exist, you want the script to create the directory. You don&#8217;t want to have to modify the script after the directory has been created. If the directory already [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/suppress-error-message-attempting-recreate-directory-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting Password-less SSH Login on UNIX Systems</title>
		<link>http://code.hammerpig.com/troubleshooting-passwordless-ssh-login-unix-systems.html</link>
		<comments>http://code.hammerpig.com/troubleshooting-passwordless-ssh-login-unix-systems.html#comments</comments>
		<pubDate>Mon, 06 Dec 2010 16:55:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=664</guid>
		<description><![CDATA[There&#8217;s a nice way of setting up a UNIX-based server so you can log in without a password. This technique uses public/private key encryption. You set it up one time on your client machine and one time on each server you want to connect to. Then you can SSH into the server without using a [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/troubleshooting-passwordless-ssh-login-unix-systems.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Shortcut to Open Terminal in Specific Directory in Ubuntu</title>
		<link>http://code.hammerpig.com/creating-shortcut-open-terminal-specific-directory-ubuntu.html</link>
		<comments>http://code.hammerpig.com/creating-shortcut-open-terminal-specific-directory-ubuntu.html#comments</comments>
		<pubDate>Sun, 25 Apr 2010 02:45:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=637</guid>
		<description><![CDATA[I finally made the leap to doing most of my research on computers that run on Linux. The distribution I&#8217;m using is Ubuntu. So far I&#8217;ve found it quite good. One thing I do frequently is open a Terminal (command) window in a specific directory. However, when you open the Terminal, it by default opens [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/creating-shortcut-open-terminal-specific-directory-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Solving &#8220;cannot find xml2-config&#8221; on Ubuntu 9.10</title>
		<link>http://code.hammerpig.com/solving-find-xml2config-ubuntu-910.html</link>
		<comments>http://code.hammerpig.com/solving-find-xml2config-ubuntu-910.html#comments</comments>
		<pubDate>Thu, 22 Apr 2010 21:02:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=634</guid>
		<description><![CDATA[I was trying to install some packages in R recently that depended on the XML package. I used the nifty install.packages() command, but I was getting an error:
&#8220;cannot find xml2-config&#8221;
This error was preventing these other packages from being installed properly. It turns out that I needed to install a library called libxml2-dev. In my case, [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/solving-find-xml2config-ubuntu-910.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Overcoming cygwin &#8220;Error: no display specified&#8221;</title>
		<link>http://code.hammerpig.com/overcoming-cygwin-error-display.html</link>
		<comments>http://code.hammerpig.com/overcoming-cygwin-error-display.html#comments</comments>
		<pubDate>Mon, 28 Dec 2009 18:15:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=608</guid>
		<description><![CDATA[I installed cygwin, which allows you to execute Linux-based applications on your Windows machines. But what I wanted to do was connect (using ssh) to a Linux box and run an application that has a GUI from there. In this case, I wanted to be able to connect to server and run firefox from the [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/overcoming-cygwin-error-display.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

