<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Hai's Blog</title>
	<atom:link href="http://wuhrr.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wuhrr.wordpress.com</link>
	<description>Useful stuff, life, photography, kids, technical, programming, and what-else?</description>
	<lastBuildDate>Sun, 11 Oct 2009 20:16:33 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='wuhrr.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/f8120801a8114f6b45713b55178c601c?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Hai's Blog</title>
		<link>http://wuhrr.wordpress.com</link>
	</image>
			<item>
		<title>Add Color Coding to Mac OS X&#8217;s Quick Look for Source Codes</title>
		<link>http://wuhrr.wordpress.com/2009/10/11/add-color-coding-to-mac-os-xs-quick-look-for-source-codes/</link>
		<comments>http://wuhrr.wordpress.com/2009/10/11/add-color-coding-to-mac-os-xs-quick-look-for-source-codes/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 20:13:14 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/10/11/add-color-coding-to-mac-os-xs-quick-look-of-source-codes/</guid>
		<description><![CDATA[The Problem
The recent releases of Mac OS X has a wonderful feature: quick look. By selecting a file in the Finder and hit spacebar, the user can quickly view the contents of that file, be it text, audio, video, graphics, and many other file types. I often want to quick look the contents of my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=370&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>The Problem</h2>
<p>The recent releases of Mac OS X has a wonderful feature: quick look. By selecting a file in the Finder and hit spacebar, the user can quickly view the contents of that file, be it text, audio, video, graphics, and many other file types. I often want to quick look the contents of my source codes and encountered two problems: First, As shipped, quick look does not support many types of source code, specifically Tcl. Second, the default quickly is pretty bland without any color code at all.</p>
<p><img src="http://farm4.static.flickr.com/3462/4002372394_2b14252628_o.png" /></p>
<h2>The Solution</h2>
<p>My search took me to a wonderful piece of software called <a href="http://code.google.com/p/qlcolorcode/">qlcolorcode</a> and it did what I want. Now instead of seeing the above boring quick look, I see something like:</p>
<p><img src="http://farm3.static.flickr.com/2432/4002372352_a6c8fd71dd_o.png" /></p>
<p>If you like what you see and decide to use it, head over the developer&#8217;s <a href="http://code.google.com/p/qlcolorcode/">site</a> and grab it. The installation is easy, so just jump right in. When you are there, please read the <a href="http://code.google.com/p/qlcolorcode/wiki/ReadMe">ReadMe</a> for customization such as adding line numbers or changing the font.</p>
Posted in OSX, Programming  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/370/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=370&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/10/11/add-color-coding-to-mac-os-xs-quick-look-for-source-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3462/4002372394_2b14252628_o.png" medium="image" />

		<media:content url="http://farm3.static.flickr.com/2432/4002372352_a6c8fd71dd_o.png" medium="image" />
	</item>
		<item>
		<title>Sweeten Bash History by Adding Grep</title>
		<link>http://wuhrr.wordpress.com/2009/10/11/sweeten-bash-history-by-adding-grep/</link>
		<comments>http://wuhrr.wordpress.com/2009/10/11/sweeten-bash-history-by-adding-grep/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 07:05:22 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/10/11/sweeten-bash-history-by-adding-grep/</guid>
		<description><![CDATA[The Problem
While I know about the Ctrl-R key combination in bash to perform an incremental reverse search the history; I often need to grep the history to find what I want. For example, to find out what directory I changed into, I issue the following command:

$ history &#124; grep cd

That&#8217;s a lot of typing for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=367&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>The Problem</h2>
<p>While I know about the Ctrl-R key combination in bash to perform an incremental reverse search the history; I often need to grep the history to find what I want. For example, to find out what directory I changed into, I issue the following command:</p>
<pre class="brush: bash;">
$ history | grep cd
</pre>
<p>That&#8217;s a lot of typing for a lazy guy like me. Imagine that. I rather spend my time writing this blog that repeating that command.</p>
<h2>The Solution</h2>
<p>To solve this problem, I created a simple function and placed it in my ~/.bash_profile file:</p>
<pre class="brush: bash;">
function h() {
    if [ -z "$1" ]
    then
        history
    else
        history | grep "$@"
    fi
}
</pre>
<h2>Explanation</h2>
<ul>
<li>Line 2-5: If the user call the command h without any parameter, the function calls the history command</li>
<li>Line 6-7: Otherwise, issue the history command and use grep to search.</li>
</ul>
<p>Going back to my original example, the command now becomes:</p>
<pre class="brush: bash;">
$ h cd
</pre>
<p>Clearly, this is the way life should be: short and sweet. See you in another post.</p>
Posted in bash, Programming  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=367&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/10/11/sweeten-bash-history-by-adding-grep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Assign a List&#8217;s Elements to Variables</title>
		<link>http://wuhrr.wordpress.com/2009/10/08/how-to-assign-a-lists-elements-to-variables/</link>
		<comments>http://wuhrr.wordpress.com/2009/10/08/how-to-assign-a-lists-elements-to-variables/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 01:10:43 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/10/08/how-to-assign-a-lists-elements-to-variables/</guid>
		<description><![CDATA[The Problem
You want to assign the contents of a list to a number of variables. For example, assigning contents of $argv to variables server, port, user, and password:

set server [lindex $argv 0]
set port [lindex $argv 1]
set user [lindex $argv 2]
set password [lindex $argv 3]

The Solution
This is what the lassign command is designed to do, see [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=365&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>The Problem</strong></p>
<p>You want to assign the contents of a list to a number of variables. For example, assigning contents of $argv to variables server, port, user, and password:</p>
<pre class="brush: bash;">
set server [lindex $argv 0]
set port [lindex $argv 1]
set user [lindex $argv 2]
set password [lindex $argv 3]
</pre>
<p><strong>The Solution</strong></p>
<p>This is what the lassign command is designed to do, see my previous post. However, prior to Tcl version 8.5, using lassign means you must load the entire TclX package, which might be expensive for one little command.</p>
<p>If you don&#8217;t want to require the whole TclX package just for this task, here is another alternative solution: using the foreach idiom:</p>
<pre class="brush: bash;">
foreach {server port user password} $argv break
</pre>
<p>The above is the same as using lassign:</p>
<pre class="brush: bash;">
package require Tclx
lassign $argv server port user password
</pre>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/365/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=365&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/10/08/how-to-assign-a-lists-elements-to-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OS X Bag of Tips</title>
		<link>http://wuhrr.wordpress.com/2009/09/25/mac-os-x-bag-of-tips/</link>
		<comments>http://wuhrr.wordpress.com/2009/09/25/mac-os-x-bag-of-tips/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 04:56:51 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/09/25/mac-os-x-bag-of-tips/</guid>
		<description><![CDATA[Every day, I spend most of my work hours at the OS X terminal. Consequently, I accumulated a few tips and tricks I would like to share with the readers.
Selecting Text

To select a word, double click on that word. The terminal is smart enough to discern when the period acts as a sentence terminator and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=364&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Every day, I spend most of my work hours at the OS X terminal. Consequently, I accumulated a few tips and tricks I would like to share with the readers.</p>
<p><strong>Selecting Text</strong></p>
<ul>
<li>To select a word, double click on that word. The terminal is smart enough to discern when the period acts as a sentence terminator and when it is part of a file name. In the later case, the whole file name is selected. After double clicking and before releasing the mouse button, the  user can drag the mouse to select additional words</li>
<li>To select a line, triple click on that line and drag the mouse up or down to select additional lines</li>
<li>To select space-delimited text, hold down Command and Shift and double click on the text. This action is useful for select path names. If the path name contains one or more spaces, drag the mouse to select the rest</li>
<li>If the user holds down the Command and Shift keys and double click a URL, OS X will open that URL in the default browser</li>
<li>If the user holds down the Option key, the mouse pointer will change to a cross hair for selecting column of text. An example of this application is for selecting the output of the ls command</li>
</ul>
<p><strong>Windows Management</strong></p>
<ul>
<li>The Command+1 combination will bring the focus to the first window, Command+2 to the the second and so on.</li>
<li>The Command + left/right arrows switch between terminal windows</li>
<li>Like other OS X applications, the Command + ` also switches between windows</li>
<li>The Shift + Command + [ or ] combo switch between different tabs</li>
<li>The Command + up/down arrows scroll through the window&#8217;s buffer, one line a time; the page up/down keys scroll one screen.</li>
<li>The Window &gt; Split Pane menu or Command + D will split the window into two panes&#8211;useful for scrolling back to review previous text and/or select them</li>
</ul>
<p><strong>Saving a Transcript</strong></p>
<ul>
<li>To save the plain text transcript of all interactions since the window opened, click on the Shell &gt; Export Text As&#8230; menu</li>
<li>To save the PDF transcript, click on the Shell &gt; Print&#8230;, click the PDF button and select the appropriate choice</li>
</ul>
<p><strong>Window Group</strong></p>
<p>I usually open two windows and arrange them side by side. Window group is a nice feature which helps me defining a group of windows for later use. To define a window group, first open as many windows as you would like and arrange/resize them. Next click the Window &gt; Save Windows As Group&#8230; menu and give it a name. The &#8220;Use window group when Terminal starts&#8221; check box is self-explanatory.</p>
<p><strong>Conclusion</strong></p>
<p>These are just a handful of tricks that I can remember. I am sure the Terminal has more up its sleeve, waiting for us to discover. If you know a trick, please feel free to comment.</p>
Posted in OSX  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/364/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=364&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/09/25/mac-os-x-bag-of-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick and Dirty Way to Parse Command Line in a Bash Script</title>
		<link>http://wuhrr.wordpress.com/2009/09/18/quick-and-dirty-way-to-parse-command-line-in-a-bash-script/</link>
		<comments>http://wuhrr.wordpress.com/2009/09/18/quick-and-dirty-way-to-parse-command-line-in-a-bash-script/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 02:48:51 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/09/18/quick-and-dirty-way-to-parse-command-line-in-a-bash-script/</guid>
		<description><![CDATA[The Problem
I want a quick and dirty way to parse command line from my bash script. For example:

	myscript.sh --file foo.txt --width 72

The Solution
The method is truly quick and dirty, but before we dive right in, let&#8217;s make a few assumptions:

Each flag must be followed by a value. That means &#8211;debug 1 is fine, but &#8211;debug [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=361&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>The Problem</strong></p>
<p>I want a quick and dirty way to parse command line from my bash script. For example:</p>
<pre>
	myscript.sh --file foo.txt --width 72
</pre>
<p><strong>The Solution</strong></p>
<p>The method is truly quick and dirty, but before we dive right in, let&#8217;s make a few assumptions:</p>
<ul>
<li>Each flag must be followed by a value. That means <em>&#8211;debug 1</em> is fine, but <em>&#8211;debug</em> is not</li>
<li>The flag name will become the variable name. For example, <em>&#8211;file foo.txt</em> will result in a variable <em>$file</em> which has value <em>foo.txt</em></li>
<li>The function does not check or validate the variables in any way. It&#8217;s a GIGO (garbage in, garbage out) situation</li>
<li>Flags can have one- or two-dash: <em>-debug</em> is the same as <em>&#8211;debug</em></li>
</ul>
<p>With that in mind, let&#8217;s take a look at the function</p>
<pre class="brush: bash;">
# file: getopt_simple.sh
function getopt_simple()
{
    until [ $# -eq 0 ]
    do
        eval ${1##*-}='$2'
        shift 2
    done
}
</pre>
<p>Below is a sample script which make use of this function</p>
<pre class="brush: bash;">
#!/bin/sh

# file: getopt_simple_tryout
# Try out the simple getopt function

# Include the function
source getopt_simple.sh

# Simulate the command line
set -- --file myfile.txt -depth 3 -width 72 --name "Hai Vu"

# Parse the command line
getopt_simple "$@"

# Now show the variables
echo "file  = $file "
echo "depth = $depth"
echo "name  = $name "
</pre>
<p>Here is its output:</p>
<pre>
	$ getopt_simple_tryout.sh
	file  = myfile.txt
	depth = 3
	name  = Hai Vu
</pre>
<p><strong>Explanation</strong></p>
<ul>
<li>Line 4: Loop until we exhaust the parameters on the command line</li>
<li>Line 6: The ${1##*-} expression strips the preceding dashes (-) from $1. We treats $1 as the name of the variable and $2 as its value</li>
<li>Line 7: Move to the next pair of parameters</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>This function does not do any checking or validation at all, but it is short and sweet&#8211;good for those times when you need to try something out quickly</p>
Posted in bash, Programming  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/361/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=361&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/09/18/quick-and-dirty-way-to-parse-command-line-in-a-bash-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>
	</item>
		<item>
		<title>Parse Command Line in a Tcl Script</title>
		<link>http://wuhrr.wordpress.com/2009/09/13/parse-command-line-in-a-tcl-script/</link>
		<comments>http://wuhrr.wordpress.com/2009/09/13/parse-command-line-in-a-tcl-script/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 16:14:27 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tcl]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/09/13/parse-command-line-in-a-tcl-script/</guid>
		<description><![CDATA[The Problem
I am writing script in Tcl, but want an easy and simple way to parse command line parameter. For example, the user might invoke my script as:

	tclsh myscript.tcl -server testserver15 -user testuser3

The Solution
This is one way to solve the problem. It does not mean to be the only one, but an easy and simple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=345&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>The Problem</strong></p>
<p>I am writing script in Tcl, but want an easy and simple way to parse command line parameter. For example, the user might invoke my script as:</p>
<pre>
	tclsh myscript.tcl -server testserver15 -user testuser3
</pre>
<p><strong>The Solution</strong></p>
<p>This is one way to solve the problem. It does not mean to be the only one, but an easy and simple one. The solution is to use a library package called cmdline which comes with most Tcl installations. Below is a sample script I wrote to demonstrate this technique.</p>
<p><strong>The Sample Script</strong></p>
<p>To demonstrate the solution, I created a sample script called <em>parse_argv.tcl</em> with the following contents:</p>
<pre class="brush: bash;">
package require cmdline

# Show argv before processing
puts &quot;Before, argv = '$argv'&quot;

# Process the command line
set parameters {
    {server.arg &quot;&quot;   &quot;Which server to test&quot;}
    {port.arg   5551 &quot;Port to send test cmd&quot;}
    {user.arg   &quot;&quot;   &quot;Login name&quot;}
    {debug           &quot;Output extra debug info&quot;}
}
array set arg [cmdline::getoptions argv $parameters]

# Verify required parameters
set requiredParameters {server user}
foreach parameter $requiredParameters {
    if {$arg($parameter) == &quot;&quot;} {
        puts stderr &quot;Missing required parameter: -$parameter&quot;
        exit 1
    }
}

# Displays the arguments
puts &quot;&quot;
parray arg
puts &quot;&quot;

# Show argv after processing
puts &quot;After, argv = '$argv'&quot;
</pre>
<p><strong>Explanation</strong></p>
<ul>
<li>Line 7 &#8211; Define the command line parameters and their defaults. If a parameter has an .arg suffix, then it must be followed by a value. A parameter without the .arg suffix is a simple boolean (0 or 1) parameter. Please note that the parameter names are case sensitive, so <em>-server</em> is not the same as <em>-Server</em>.For more information, please consult the documentation for cmdline.</li>
<li>Line 8 &#8211; A call to <em>cmdline::getoptions</em> does all the works. Please note:
<ol>
<li>If the user supplies a parameter not that <em>getoptions</em> does not recognize, it will display a usage and throw an error, which will cause the script to exit prematurely.</li>
<li>If <em>getoptions</em> encounters a &#8216;&#8211;&#8217; (double dashes) on the command line, it will delete that token and stop processing. This behavior is consistent with many Unix&#8217;s commands.</li>
<li>The contents of argv will be modified. That is why we pass <em>argv</em> instead of <em>$argv</em> to <em>getoptions</em>.</li>
<li>getoptions returns a list of keyword/value such as {server &#8220;&#8221; port 5551 &#8230;}. The array set turns this list into an array.</li>
</ol>
</li>
<li>Line 30 &#8211; After processing the command line, argv contains the left-over. Please take a look at the Sample Runs section for an example of this behavior</li>
</ul>
<p><strong>Sample Runs</strong></p>
<pre>
	$ tclsh parse_argv.tcl
	Before, argv = ''
	Missing required parameter: -server
</pre>
<p>Invoke the script without specifying the required parameters will cause it to show an error then exit.</p>
<hr />
<pre>
	$ tclsh parse_argv.tcl -server testserver15 -user testuser3 extra1 extra2
	Before, argv = '-server testserver15 -user testuser3 extra1 extra2'

	arg(debug)  = 0
	arg(port)   = 5551
	arg(server) = testserver15
	arg(user)   = testuser3

	After, argv = 'extra1 extra2'
</pre>
<p>In this run, the user specifies all the required parameters and a few extras. Notice:</p>
<ul>
<li>How <em>argv</em> changed after calling <em>getoptions</em></li>
<li><em>arg(debug)</em> is 0 because the user has not specified a <em>-debug</em> flag in the command line</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>The cmdline package offers a simple and easy way to parse command line parameters. It should save programmers coding time and sanity. The package is not perfect: it does not check for required parameters, nor does it validate them. In the script, I worked around the first issue by checking for required parameters myself (lines 16 to 22). </p>
<p>To demonstrate the second issue, let&#8217;s take a look at the <em>-port</em> parameter. If I require this parameter to be an integer between 5000-5999, I have to write the verification myself.</p>
<p>I hope cmdline to evolve and address these issues. Meanwhile, I am glad to have it under my belt.</p>
Posted in Programming, Tcl  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/345/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=345&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/09/13/parse-command-line-in-a-tcl-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>
	</item>
		<item>
		<title>Share Your Printer in Snow Leopard &#8211; How To</title>
		<link>http://wuhrr.wordpress.com/2009/09/12/share-your-printer-in-snow-leopard-how-to/</link>
		<comments>http://wuhrr.wordpress.com/2009/09/12/share-your-printer-in-snow-leopard-how-to/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 15:52:27 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/09/12/share-your-printer-in-snow-leopard-how-to/</guid>
		<description><![CDATA[

This tutorial solves the following problem: the user wants to print to a printer attached to another Mac.


Open the System Preferences

	


Click on the Apple menu at the top left corner of your screen, then click on &#34;System Preferences&#34;


Open Print &#38; Fax

	


Locate and click on this icon


Turn on Sharing

	


(1) Click on the printer you want to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=344&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="LessonContent">
<div class="LessonSummary">
<p>This tutorial solves the following problem: the user wants to print to a printer attached to another Mac.</p>
</p></div>
<div class="LessonStep top">
<h3 class="StepTitle">Open the System Preferences</h3>
<div class="StepImage">
	<img src="http://wuhrr.files.wordpress.com/2009/09/media_1252769931991.png?w=246&#038;h=173" width="246" height="173" alt="media_1252769931991.png" />
</div>
<div class="StepInstructions">
<p>Click on the Apple menu at the top left corner of your screen, then click on &quot;System Preferences&quot;</p>
</div></div>
<div class="LessonStep top">
<h3 class="StepTitle">Open Print &amp; Fax</h3>
<div class="StepImage">
	<img src="http://wuhrr.files.wordpress.com/2009/09/media_1252769994132.png?w=263&#038;h=185" width="263" height="185" alt="media_1252769994132.png" />
</div>
<div class="StepInstructions">
<p>Locate and click on this icon</p>
</div></div>
<div class="LessonStep top">
<h3 class="StepTitle">Turn on Sharing</h3>
<div class="StepImage">
	<img src="http://wuhrr.files.wordpress.com/2009/09/media_1252770020623.png?w=540&#038;h=336" width="540" height="336" alt="media_1252770020623.png" />
</div>
<div class="StepInstructions">
<p>(1) Click on the printer you want to share, then (2) Turn on the share check box. </p>
<p>On the other computer, add a printer and you will find this printer in the list of shared printers. </p>
</div></div>
</div>
Posted in OSX  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=344&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/09/12/share-your-printer-in-snow-leopard-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>

		<media:content url="http://wuhrr.files.wordpress.com/2009/09/media_1252769931991.png" medium="image">
			<media:title type="html">media_1252769931991.png</media:title>
		</media:content>

		<media:content url="http://wuhrr.files.wordpress.com/2009/09/media_1252769994132.png" medium="image">
			<media:title type="html">media_1252769994132.png</media:title>
		</media:content>

		<media:content url="http://wuhrr.files.wordpress.com/2009/09/media_1252770020623.png" medium="image">
			<media:title type="html">media_1252770020623.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple Menu with Bash&#8217;s Select Command</title>
		<link>http://wuhrr.wordpress.com/2009/09/10/simple-menu-with-bashs-select-command/</link>
		<comments>http://wuhrr.wordpress.com/2009/09/10/simple-menu-with-bashs-select-command/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 05:08:50 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/09/10/simple-menu-with-bashs-select-command/</guid>
		<description><![CDATA[The Problem
Sometimes, I need a simple menu in bash, but I don&#8217;t want to spend a good deal of time coding for one.
The Solution
Bash has a built-in command called select which gets the job done. To demonstrate this command, I am going to write a short bash script. This script lists all the files in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=335&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>The Problem</strong></p>
<p>Sometimes, I need a simple menu in <em>bash</em>, but I don&#8217;t want to spend a good deal of time coding for one.</p>
<p><strong>The Solution</strong></p>
<p>Bash has a built-in command called <em>select</em> which gets the job done. To demonstrate this command, I am going to write a short bash script. This script lists all the files in the current directory, then prompts the user to make a choice. If the choice is valid, it invokes the editor on the file. It will ignore any invalid choice. Below is the source for that script:</p>
<pre class="brush: bash;">
#!/bin/sh
# Displays a list of files in current directory and prompt for which
# file to edit

# Set the prompt for the select command
PS3=&quot;Type a number or 'q' to quit: &quot;

# Create a list of files to display
fileList=$(find . -maxdepth 1 -type f)

# Show a menu and ask for input. If the user entered a valid choice,
# then invoke the editor on that file
select fileName in $fileList; do
	if [ -n &quot;$fileName&quot; ]; then
		vim ${fileName}
	fi
	break
done
</pre>
<p><strong>Explanation</strong></p>
<p>Line 6 &#8211; By default the <em>select</em> commmand uses &#8216;#?&#8217; as a menu prompt. If the variable PS3 is defined, it will use that variable instead.</p>
<p>Line 9 &#8211; The find command retrieves a list of files in the current directory. The script then stores the result in the variable fileList</p>
<p>Line 13 to 18 &#8211; The <em>select .. do .. done</em> command displays a menu using <em>$fileList</em> as a list of items.</p>
<p>Line 14 to 16 &#8211; This block of code check if the user&#8217;s choice was valid and invoke the editor accordingly</p>
<p>Line 17 &#8211; The select command acts like an endless loop unless a break command is encountered</p>
<p><strong>Sample Run</strong></p>
<p>Below is a sample run</p>
<pre>
	$ edit_files.sh
	1) ./arguments
	2) ./data
	3) ./for_example
	4) ./getopt_function.sh
	5) ./getopt_homemade.sh
	6) ./getopt_tryout
	Type a number or 'q' to quit: 3
</pre>
<p><strong>The Hack</strong></p>
<p>If you are reading this far, I hope you detected my hack (hint, look at the PS3 prompt). By experimenting with <em>select</em>, I found out that if the user entered an invalid choice (i.e. a letter &#8216;q&#8217; instead of an integer) then <em>select</em> will set the control variable (<em>$fileName</em> in this case) to empty. Taking advantage of this feature (or bug?), I designed the prompt and check for non-empty variable (line 14-16) before invoking the editor.</p>
<p><strong>Conclusion</strong></p>
<p>The <em>select</em> command is easy to use, but it save the script writers from the tedious job of displaying the menu, the prompt, then ask for the user&#8217;s input. The only caveat programmers need to watch out for is the lack of input validation so be sure to check your control variable before using it.</p>
Posted in bash, Unix  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=335&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/09/10/simple-menu-with-bashs-select-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>
	</item>
		<item>
		<title>Changing Directory Listing (ls) in RHEL</title>
		<link>http://wuhrr.wordpress.com/2009/09/03/changing-directory-listing-ls-in-rhel/</link>
		<comments>http://wuhrr.wordpress.com/2009/09/03/changing-directory-listing-ls-in-rhel/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 21:27:30 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/09/03/changing-directory-listing-ls-in-rhel/</guid>
		<description><![CDATA[This is a follow-up to my previous post.
The Problem
The ls command in Redhat Enterprise Linux (RHEL) by default uses the dark blue to show directories. This color is hard to see, especially on laptops with dim screens. I would like an easy way to change that.


The Solution
The solution is similar to that in my previous [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=333&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a follow-up to my <a href="http://wuhrr.wordpress.com/2009/04/25/changing-directory-listing-ls-color-in-linux-and-mac-os-x/">previous post</a>.</p>
<p><strong>The Problem</strong><br />
The <em>ls</em> command in Redhat Enterprise Linux (RHEL) by default uses the dark blue to show directories. This color is hard to see, especially on laptops with dim screens. I would like an easy way to change that.<br />
<img src="http://farm3.static.flickr.com/2439/3885518950_a77db0c284_o.jpg"><br />
<br />
<strong>The Solution</strong></p>
<p>The solution is similar to that in my <a href="http://wuhrr.wordpress.com/2009/04/25/changing-directory-listing-ls-color-in-linux-and-mac-os-x/">previous post</a>, but Redhat makes it a little easier. Here are the steps:</p>
<ol>
<li>Create a text file containing the color definitions by issue the following command: <strong>dircolors &gt; ~/.dircolors</strong></li>
<li>Edit the file ~/.dircolors and change the colors to your taste</li>
<li>Exit the shell and login again to see the changes</li>
</ol>
<p><strong>Explanation</strong></p>
<p>When a user logs in, RHEL executes the start-up files in the /etc/profile.d directory. Among those start-up files, colorls.sh (for borne-family shells) and colorls.csh (for csh-family shells) are responsible for setting the ls colors. The scripts look in the user&#8217;s home directory for a file called .dircolors to overwrite the colors. By creating and tweaking this file, the user can change the colors of the ls command to his or her taste. Personally, I prefer the bright yellow for directory:</p>
<p><img src="http://farm3.static.flickr.com/2639/3885518386_f36b94bda5_o.jpg"></p>
Posted in Unix  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/333/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=333&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/09/03/changing-directory-listing-ls-in-rhel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2439/3885518950_a77db0c284_o.jpg" medium="image" />

		<media:content url="http://farm3.static.flickr.com/2639/3885518386_f36b94bda5_o.jpg" medium="image" />
	</item>
		<item>
		<title>I&#8217;m a PC &#8211; A Subliminal Message</title>
		<link>http://wuhrr.wordpress.com/2009/09/02/im-a-pc-a-subliminal-message/</link>
		<comments>http://wuhrr.wordpress.com/2009/09/02/im-a-pc-a-subliminal-message/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 21:44:30 +0000</pubDate>
		<dc:creator>Hai</dc:creator>
				<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://wuhrr.wordpress.com/2009/09/02/im-a-pc-a-subliminal-message/</guid>
		<description><![CDATA[



I&#8217;m a PC

Originally uploaded by haivu_ed


Microsoft is sending me a subliminal message!
Posted in OSX       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=331&subd=wuhrr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div style="float:right;margin-left:10px;margin-bottom:10px;">
<a href="http://www.flickr.com/photos/wuhrr/3882678758/" title="photo sharing"><img src="http://farm3.static.flickr.com/2463/3882678758_47574cb86a_m.jpg" alt="" style="border:solid 2px #000000;" /></a><br />
<br />
<span style="font-size:.9em;margin-top:0;"><br />
<a href="http://www.flickr.com/photos/wuhrr/3882678758/">I&#8217;m a PC</a><br />
<br />
Originally uploaded by <a href="http://www.flickr.com/people/wuhrr/">haivu_ed</a><br />
</span>
</div>
<p>Microsoft is sending me a subliminal message!<br /></p>
Posted in OSX  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wuhrr.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wuhrr.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wuhrr.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wuhrr.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wuhrr.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wuhrr.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wuhrr.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wuhrr.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wuhrr.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wuhrr.wordpress.com/331/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wuhrr.wordpress.com&blog=627615&post=331&subd=wuhrr&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://wuhrr.wordpress.com/2009/09/02/im-a-pc-a-subliminal-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/08a2c6f16c0d4dad20d169d9d76848ac?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">wuhrr</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2463/3882678758_47574cb86a_m.jpg" medium="image" />
	</item>
	</channel>
</rss>