<?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>Blog O' Matty &#187; Shell</title>
	<atom:link href="http://prefetch.net/blog/index.php/category/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://prefetch.net/blog</link>
	<description>Blog O' Matty</description>
	<lastBuildDate>Tue, 07 Feb 2012 03:00:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Fun times with the bash read function and subshells</title>
		<link>http://prefetch.net/blog/index.php/2011/10/29/fun-times-with-the-bash-read-function-and-subshells/</link>
		<comments>http://prefetch.net/blog/index.php/2011/10/29/fun-times-with-the-bash-read-function-and-subshells/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 10:54:09 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=4691</guid>
		<description><![CDATA[There are a few shellisms that have bitten me over the years. One issue that has bitten me more than once is the interation of variable assignments when a pipe is used to pass data to a subshell. This annoyance can be easily illustrated with an example: $ cat test #!/bin/bash grep MemTotal /proc/meminfo &#124; [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2011/10/29/fun-times-with-the-bash-read-function-and-subshells/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Converting time since the epoch to a human readable string</title>
		<link>http://prefetch.net/blog/index.php/2010/04/15/converting-time-since-the-epoch-to-a-human-readable-string/</link>
		<comments>http://prefetch.net/blog/index.php/2010/04/15/converting-time-since-the-epoch-to-a-human-readable-string/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 20:24:06 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=3476</guid>
		<description><![CDATA[I was parsing some Netbackup logs today, and needed a way to convert the time since the epoch into a human readable string. A while back I read about the various forms of input that can be passed to the GNU date&#8217;s &#8220;-d&#8221; option, one of these being the time since the epoch: $ date [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2010/04/15/converting-time-since-the-epoch-to-a-human-readable-string/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Advanced Bash Scripting Guide</title>
		<link>http://prefetch.net/blog/index.php/2010/04/05/advanced-bash-scripting-guide/</link>
		<comments>http://prefetch.net/blog/index.php/2010/04/05/advanced-bash-scripting-guide/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 12:58:24 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=3484</guid>
		<description><![CDATA[I came across the Advanced Bash Scripting guide while checking through my RSS feeds this morning.  It has a ton of great examples and goes pretty in-depth on Bash scripting features.  A good read for sure.  =)]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2010/04/05/advanced-bash-scripting-guide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Serve out content over HTTP from your cwd immediatly</title>
		<link>http://prefetch.net/blog/index.php/2009/10/31/serve-out-content-over-http-from-your-cwd-immediatly/</link>
		<comments>http://prefetch.net/blog/index.php/2009/10/31/serve-out-content-over-http-from-your-cwd-immediatly/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 13:22:30 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=3054</guid>
		<description><![CDATA[Ever want to immediatly serve content from a specific directory over HTTP, but didn&#8217;t want to bother messing with httpd.conf or other webserver configiurations? If you&#8217;ve got Python installed, this is a snap.  Execute python with the SimpleHTTPServer module, using port 8080 so there isn&#8217;t a need to elevate privs to root. $ python -m [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2009/10/31/serve-out-content-over-http-from-your-cwd-immediatly/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Awesome use of read-only variables in bash scripts</title>
		<link>http://prefetch.net/blog/index.php/2009/07/18/awesome-use-of-read-only-variables-in-bash-scripts/</link>
		<comments>http://prefetch.net/blog/index.php/2009/07/18/awesome-use-of-read-only-variables-in-bash-scripts/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 14:16:09 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=2596</guid>
		<description><![CDATA[I was reading through Jim Perrin&#8217;s CentOS hardening article, and saw one super interesting use of read-only bourne shell variables. If you have users that are frequently logging in and staying idle for days and or weeks, you can add a readonly TMOUT variable to /etc/profile: $ echo &#8220;readonly TMOUT=3600&#8243; >> /etc/profile The TMOUT variable [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2009/07/18/awesome-use-of-read-only-variables-in-bash-scripts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Implementing locks in shell scripts</title>
		<link>http://prefetch.net/blog/index.php/2009/06/24/implementing-locks-in-shell-scripts/</link>
		<comments>http://prefetch.net/blog/index.php/2009/06/24/implementing-locks-in-shell-scripts/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 23:22:20 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=2339</guid>
		<description><![CDATA[I have been working on a shell script that manages lxc-containers, and came across a use case last where it is possible for two yum processes to interfere with each other. To ensure that only one yum process is run at a single point in time, I implemented file based locks using flock(1). Flock makes [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2009/06/24/implementing-locks-in-shell-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indenting bourne shell here documents</title>
		<link>http://prefetch.net/blog/index.php/2009/05/26/indenting-bourne-shell-here-documents/</link>
		<comments>http://prefetch.net/blog/index.php/2009/05/26/indenting-bourne-shell-here-documents/#comments</comments>
		<pubDate>Tue, 26 May 2009 14:03:38 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=1967</guid>
		<description><![CDATA[The Bourne shell provides here documents to allow block of data to be passed to a process through STDIN. The typical format for a here document is something similar to this: command &#60;&#60;ARBITRARY_TAG data to pass 1 data to pass 2 ARBITRARY_TAG This will send the data between the ARBITRARY_TAG statements to the standard input [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2009/05/26/indenting-bourne-shell-here-documents/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Exiting from a shell script when a failure occurs</title>
		<link>http://prefetch.net/blog/index.php/2009/05/20/exiting-from-a-shell-script-when-a-failure-occurs/</link>
		<comments>http://prefetch.net/blog/index.php/2009/05/20/exiting-from-a-shell-script-when-a-failure-occurs/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:32:51 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=1946</guid>
		<description><![CDATA[While debugging an issue with one of my scripts, I wanted to abort execution and exit when a non-zero return code occurred. I recalled reading about a bash flag that provided this behaviour, and after a few minutes of reading through bash(1) I came across the following set option: &#8220;-e Exit immediately if a simple [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2009/05/20/exiting-from-a-shell-script-when-a-failure-occurs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting sed to substitute a newline on Linux and Solaris hosts</title>
		<link>http://prefetch.net/blog/index.php/2009/05/16/getting-sed-to-substitute-a-newline-on-linux-and-solaris-hosts/</link>
		<comments>http://prefetch.net/blog/index.php/2009/05/16/getting-sed-to-substitute-a-newline-on-linux-and-solaris-hosts/#comments</comments>
		<pubDate>Sat, 16 May 2009 14:48:57 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=1807</guid>
		<description><![CDATA[While crafting an install script a week or two ago, I came across an annoying issue with the Solaris sed utility. When I tried to substitute the string &#8216;, &#8216; with a newline, I got this: $ grep foo gemlist &#124; sed -e &#8216;s/foo.*(//&#8217; -e &#8216;s/)//&#8217; -e &#8216;s/, /\n/g&#8217; 2.4n2.3n2.2n2.1 But when I ran the [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2009/05/16/getting-sed-to-substitute-a-newline-on-linux-and-solaris-hosts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bash tips</title>
		<link>http://prefetch.net/blog/index.php/2009/02/17/bash-tips/</link>
		<comments>http://prefetch.net/blog/index.php/2009/02/17/bash-tips/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 19:04:25 +0000</pubDate>
		<dc:creator>matty</dc:creator>
				<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://prefetch.net/blog/?p=1037</guid>
		<description><![CDATA[I read through the bash tips on the hacktux website, which brought to light the fact that you can do basic integer math in your bash scripts. This is easily accomplished by using dual parenthesis similar to this: four=$(( 2 + 2 )) echo $four This is good stuff, and I need to replace some [...]]]></description>
		<wfw:commentRss>http://prefetch.net/blog/index.php/2009/02/17/bash-tips/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

