<?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>Rusty Razor Blade &#187; awk</title>
	<atom:link href="http://www.rustyrazorblade.com/category/awk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rustyrazorblade.com</link>
	<description>Tech Thoughts, Mostly on LAMP - by Jon Haddad</description>
	<lastBuildDate>Wed, 21 Jul 2010 20:42:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Awesome Awk Tutorial</title>
		<link>http://www.rustyrazorblade.com/2008/04/awesome-awk-tutorial/</link>
		<comments>http://www.rustyrazorblade.com/2008/04/awesome-awk-tutorial/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 07:29:48 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[awk]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/?p=116</guid>
		<description><![CDATA[This is exactly what I look for when I&#8217;m trying to find a tutorial.  Thank you, Andrew M. Ross.
My favorite awk tutorial ever.
]]></description>
			<content:encoded><![CDATA[<p>This is exactly what I look for when I&#8217;m trying to find a tutorial.  Thank you, Andrew M. Ross.</p>
<p><a href="http://doc.ddart.net/shell/awk/">My favorite awk tutorial ever.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2008/04/awesome-awk-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Report space remaining on disk on unix login</title>
		<link>http://www.rustyrazorblade.com/2008/03/report-space-remaining-on-disk-on-unix-login/</link>
		<comments>http://www.rustyrazorblade.com/2008/03/report-space-remaining-on-disk-on-unix-login/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 20:04:02 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[awk]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/2008/03/23/report-space-remaining-on-disk-on-unix-login/</guid>
		<description><![CDATA[I get a kick out of stuff like this.  Add this to your .bash_profile to be greeted with the remaining space on your disk.
df -h &#124; awk &#8216;NR==2 {print &#8220;Space available &#8221; $4}&#8217;
This will actually change depending on which version of df you&#8217;re using (i think).  I get different output on my Mac [...]]]></description>
			<content:encoded><![CDATA[<p>I get a kick out of stuff like this.  Add this to your .bash_profile to be greeted with the remaining space on your disk.</p>
<blockquote><p>df -h | awk &#8216;NR==2 {print &#8220;Space available &#8221; $4}&#8217;</p></blockquote>
<p>This will actually change depending on which version of df you&#8217;re using (i think).  I get different output on my Mac than I do on a CentOS machine &#8211; df seems to auto wrap lines on long drive names, so when I check the space on the CentOS server I need to change the line number (NR goes to 3) and the column to print (down to 3).  </p>
<p>On my mac, this is what I get:</p>
<blockquote><pre>haddad:~ jhaddad$ df -h
Filesystem      Size   Used  Avail Capacity  Mounted on
/dev/disk0s2   149Gi  144Gi  4.9Gi    97%    /
devfs          106Ki  106Ki    0Bi   100%    /dev
fdesc          1.0Ki  1.0Ki    0Bi   100%    /dev
map -hosts       0Bi    0Bi    0Bi   100%    /net
map auto_home    0Bi    0Bi    0Bi   100%    /home

haddad:~ jhaddad$ df -h | awk 'NR==2 {print "Space available " $4}'
Space available 4.9Gi
</pre>
</blockquote>
<p>I should probably clear some stuff off my drive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2008/03/report-space-remaining-on-disk-on-unix-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
