<?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>REVERT TO CONSOLE &#187; *NIX</title>
	<atom:link href="http://www.reverttoconsole.com/blog/category/nix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reverttoconsole.com</link>
	<description>for f in *;do echo &#124; sed 'i\rtc' &#62;&#62; $f;done;</description>
	<lastBuildDate>Sat, 10 Jul 2010 12:40:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Simple Processes: Bash vs. Python &#8211; &#8220;A No-Brainer&#8221;</title>
		<link>http://www.reverttoconsole.com/blog/nix/simple-tasks-bash-vs-python-a-no-brainer/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/simple-tasks-bash-vs-python-a-no-brainer/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 05:15:19 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[xmms2 scripts track length]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=535</guid>
		<description><![CDATA[I haven&#8217;t posted in about 5 billion years. Well, it seems like that anyway. As I sit here partying with my laptop on a Friday night, I&#8217;ve been wondering how to display the track length of the current track that xmms2 is playing, without having to use the &#8220;xmms2 status&#8221; command. Yes, I listen to [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in about 5 billion years.  Well, it seems like that anyway.  As I sit here partying with my laptop on a Friday night, I&#8217;ve been wondering how to display the track length of the current track that xmms2 is playing, without having to use the &#8220;xmms2 status&#8221; command.  Yes, I listen to and control all my music via a full-featured music player/manager from the command line (xmms2).  The problem with using the &#8220;status&#8221; command, is that it just prints out a continuous status of what&#8217;s playing and it just keeps going, which is exactly what it&#8217;s supposed to do.  It&#8217;s just like &#8220;tail -f&#8221;, So you have to ctrl-c to get out of it.  Yes. That is my sole motivation for doing this, to avoid ctrl-c.  Well, and maybe to learn a thing or two, but mostly out of defiance of having to use ctrl-c.  </p>
<p>So I figured, hey I know enough bash to at least get something rolling in order to do this.  Of course I had to keep looking stuff up in reference guides and on websites, because there&#8217;s no way I can remember it all.  Basically, it came down to 4 key tools for going the bash route.</p>
<p>1. sed &#8211; to strip brackets, slashes, colons, spaces, and other undesired characters in order to make the strings easier to deal with<br />
2. awk &#8211;  to find the location of decimal points or other characters<br />
3. cut &#8211; to get characters to the left or right of decimal points<br />
4. bc &#8211; to calculate and convert the milliseconds to human readable form </p>
<p>I finally got it to work reliably tonight.<br />
It was a horrid process that took forever.  What a waste of time.  But hey, that&#8217;s all part of the RTC experience!<br />
So here it is, please excuse the bad variable names and sloppiness. I was too pissed to give a ****.<br />
Note: I renamed this to xmms2tracklensafe and cut out all the curse words and tried to put some sense into the comments.</p>
<pre class="brush: java">
#!/bin/bash
tmpfileinfo=xtemp14251.tmp
tmpfile=xtemp91839.tmp
#use xmms2 info here
xmms2 info &gt; $tmpfileinfo
vargrep=$(grep &quot;duration&quot; $tmpfileinfo)
echo $vargrep &gt; $tmpfileinfo
#chopping the brackets, slashes, and spaces out of the string
sed -i &#039;s/\[//g&#039; $tmpfileinfo
sed -i &#039;s/\]//g&#039; $tmpfileinfo
sed -i &#039;s/\///g&#039; $tmpfileinfo
sed -i &#039;s/&#039;\ &#039;//g&#039; $tmpfileinfo
#convert the = to an X, easy to find
sed -i &#039;s/\=/X/g&#039; $tmpfileinfo
#for an mp3 - pluginmaddurationX
sed -i &#039;s/\pluginmaddurationX//g&#039; $tmpfileinfo
#for a flac - pluginflacdurationX
sed -i &#039;s/\pluginflacdurationX//g&#039; $tmpfileinfo
#God knows what other codecs there might be
#prints the time in milliseconds
echo &quot;$(cat $tmpfileinfo) ms&quot;
vargrep2=$(cat $tmpfileinfo)
varx=$vargrep2
#convert the time to minutes
var2=$(echo &quot;$varx/1000/60&quot; | bc -l)
echo $var2 &gt; $tmpfile
#we are left with a fraction of a minute, which occurs after the decimal, we need to find the decimal point
var3=$(awk &#039;BEGIN { print index(&#039;$var2&#039;, &quot;.&quot;) }&#039;)
#get the characters after the decimal point, this is our fraction of a minute
var4=$(cut -c $var3- $tmpfile)
#convert that fraction of a minute into seconds
var5=$(echo &quot;scale=1; $var4*60&quot; | bc -l | xargs printf &quot;%1.0f&quot;)
#simply subtracting a 1 from the index of the decimal point, to be used in order to retrieve the number left of the decimal
varcut=$(echo &quot;$var3 - 1&quot; | bc -l | xargs printf &quot;%1.0f&quot;)
#gets the number to the left of the decimal
var6=$(cut -c -$varcut $tmpfile)
#now we need to deal with the decimal in the number that has been converted to seconds
var7=$(awk &#039;BEGIN { print index(&#039;$var5&#039;, &quot;.&quot;) }&#039;)
varcut2=1
#I honestly don&#039;t remember why I did this.  I think I needed it before I started adding | xargs printf &quot;%1.0f&quot;
if [ &quot;0&quot; != $var7 ]
	then
		varcut2=$(echo &quot;$var7 - 1&quot; | bc -l | xargs printf &quot;%1.0f&quot;)
fi

echo $var5 &gt; $tmpfile
#now we get the seconds as a whole number, by getting the characters left of the decimal
var8=$(cut -c -$varcut2 $tmpfile)
var8=$(cat $tmpfile)

#need to prepend a 0 to the seconds if they are under 10
if [ $var8 -lt 10 ]
	then
		var8=&quot;0$var8&quot;
fi

#print out the time in human readable form, minutes : seconds
echo &quot;$var6:$var8&quot;
#clean up the temp files
rm -f $tmpfile
rm -f $tmpfileinfo
</pre>
<p>Wow, what a pain in the pee-hole.  It took me several hours over two nights and I even lost some sleep over it.  So, I decided to try it Jeff&#8217;s way, using Python, since he brags about it so much.  I had never used it before, and now that I have, I think I&#8217;ll be using it a lot!  A lot of you are saying, &#8220;Well yeah, duh. Idiot.&#8221; or something more insulting, and I fully accept that.  In fact, I encourage it!</p>
<p>First, we have the simple bash script that is used to execute the entire process from the command line.</p>
<pre class="brush: java">
#!/bin/bash

tmpfile=assscrambler124524.tmp
xmms2 info &gt; $tmpfile

python ~/scripts/xmms2len.py

rm -f $tmpfile
</pre>
<p>And now we have the giant, complex, and horrendous python script.</p>
<pre class="brush: java">
file = open(&#039;./assscrambler124524.tmp&#039;)
for line in file:
	if(line.find(&#039;duration&#039;,0) &gt; -1) :
		#print(line)
		s = line
		searchstr = &#039;duration = &#039;;
		x = s.rindex(searchstr, 0);
		if(x &gt; -1):
			timeMillis = s[x+len(searchstr):len(s)].strip()
			#print(timeMillis)
			timeConverted = float(timeMillis)/1000/60
			#print(timeConverted);
			stime = str(timeConverted)
			decIndex = stime.rindex(&#039;.&#039;, 0)
			timeFraction = float(stime[decIndex:len(stime)])
			seconds = int(round(timeFraction*60,0))
			strseconds = str(seconds)
			minutes = stime[0:decIndex]
			strminutes = str(minutes)
			if(seconds &lt; 10) :
				strseconds = &#039;0&#039; + str(seconds)
			print(timeMillis + &#039; ms\n&#039; + str(minutes) + &#039;:&#039; + strseconds)
			break
</pre>
<p>Wait, that&#8217;s it?  Just some simple searches, substrings, calculations, easy conversions between types, and that&#8217;s all?  Not to mention the incredibly easy way to open a file and iterate through its lines.<br />
Now, I commented out some print statements here, and I could have compacted it more, but I wanted it to be reasonably clear.  The point of course, and 95% of you know probably know this already, is that python kicks bash&#8217;s ass when it comes to things that should be, well, programs.  Of course bash scripts will always have their place, and they are necessary for so many things.  I still love bash and am very fond of it, but from a programming perspective, it just doesn&#8217;t &#8220;cut the mustard&#8221;, as Jeff would say.</p>
<p>Well, that&#8217;s it for my exciting Friday night.  Someday I&#8217;ll get my crap together and talk more about my xmms2 setup, the xmms2 python equalizer, the xmms2 scrobbler for last.fm, and the other scripts I&#8217;ve written for xmms2.</p>
<p>Cya!</p>
<p>My main reference for python: <a href="http://www.astro.ufl.edu/~warner/prog/python.html">http://www.astro.ufl.edu/~warner/prog/python.html</a></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/simple-tasks-bash-vs-python-a-no-brainer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux Banging</title>
		<link>http://www.reverttoconsole.com/blog/nix/linux-banging/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/linux-banging/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 14:16:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=431</guid>
		<description><![CDATA[This is a great list of bang command usage.]]></description>
			<content:encoded><![CDATA[<p><a href="http://codytaylor.org/2009/09/linux-bang-commands.html">This is a great</a> list of bang command usage.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F&amp;title=Linux+Banging" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F&amp;title=Linux+Banging" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F&amp;title=Linux+Banging" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F&amp;title=Linux+Banging" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F&amp;title=Linux+Banging', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F&amp;title=Linux+Banging" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Flinux-banging%2F&amp;title=Linux+Banging" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/linux-banging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Shortcuts</title>
		<link>http://www.reverttoconsole.com/blog/nix/bash-shortcuts/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/bash-shortcuts/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:11:15 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[*NIX]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=416</guid>
		<description><![CDATA[A nice list of bash shortcuts]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/">A nice list of bash shortcuts</a></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F&amp;title=Bash+Shortcuts" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F&amp;title=Bash+Shortcuts" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F&amp;title=Bash+Shortcuts" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F&amp;title=Bash+Shortcuts" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F&amp;title=Bash+Shortcuts', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F&amp;title=Bash+Shortcuts" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbash-shortcuts%2F&amp;title=Bash+Shortcuts" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/bash-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick command line spell check of a single word or sentence</title>
		<link>http://www.reverttoconsole.com/blog/nix/quick-command-line-spell-check-of-a-single-word-or-sentence/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/quick-command-line-spell-check-of-a-single-word-or-sentence/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 16:43:53 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[CodeSnippets]]></category>
		<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=413</guid>
		<description><![CDATA[Here&#8217;s a short bash script, using aspell, to spell check a word or several words from the command line. It&#8217;s simple but effective. If anyone else knows a cleaner or even simpler way, please let us know. #!/bin/bash WORD=$1 TEMPFILE=temp.spell echo $WORD > $TEMPFILE aspell -c $TEMPFILE cat $TEMPFILE rm -f $TEMPFILE rm -f $TEMPFILE.bak [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a short bash script, using aspell, to spell check a word or several words from the command line.  It&#8217;s simple but effective.  If anyone else knows a cleaner or even simpler way, please let us know.</p>
<p><code><br />
#!/bin/bash</p>
<p>WORD=$1<br />
TEMPFILE=temp.spell</p>
<p>echo $WORD > $TEMPFILE<br />
aspell -c $TEMPFILE<br />
cat $TEMPFILE<br />
rm -f $TEMPFILE<br />
rm -f $TEMPFILE.bak<br />
</code></p>
<p>I named this script &#8220;spell&#8221;.  Simply use it like so:<br />
<code><br />
$ spell reccomend<br />
</code></p>
<p>Aspell will run and you can make your changes.<br />
<code><br />
reccomend</p>
<p>1) recommends                           6) commend<br />
2) recommend                            7) recommenced<br />
3) reckoned                             <img src='http://www.reverttoconsole.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> recommended<br />
4) regiment                             9) Redmond<br />
5) recombined                           0) rejoined<br />
i) Ignore                               I) Ignore all<br />
r) Replace                              R) Replace all<br />
a) Add                                  l) Add Lower<br />
b) Abort                                x) Exit<br />
</code></p>
<p>In this case, if I type &#8220;2&#8243;, the correction will be made, aspell will exit and the spelling I chose gets printed out.</p>
<p>Here&#8217;s an example of how to use it with a sentence.<br />
<code><br />
$ spell "I go to the storede and buy beakh clotes"<br />
</code></p>
<p>Now aspell will take you through each misspelled word.  After you finish the corrections it will exit and print out the corrected sentence or series of words.<br />
<code><br />
I go to the store and buy beach clothes<br />
</code></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/quick-command-line-spell-check-of-a-single-word-or-sentence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Revert to Console for IM &#8211; Gtalk Example using Mcabber</title>
		<link>http://www.reverttoconsole.com/blog/nix/revert-to-console-for-im-gtalk-example-using-mcabber/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/revert-to-console-for-im-gtalk-example-using-mcabber/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 21:28:05 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=390</guid>
		<description><![CDATA[I can finally sleep at night now that I have a command-line solution for Google Talk. What&#8217;s needed (for a poor windows user): Mcabber, a jabber client from http://mcabber.com Cygwin, http://cygwin.com Ssh package for cygwin, if you need to install mcabber elsewhere and then connect to it remotely. If cygwin and ssh are new to [...]]]></description>
			<content:encoded><![CDATA[<p>I can finally sleep at night now that I have a command-line solution for Google Talk.</p>
<p>What&#8217;s needed (for a poor windows user):</p>
<ul>
<li>Mcabber, a jabber client from <a title="http://mcabber.com/" href="http://mcabber.com/">http://mcabber.com</a></li>
<li>Cygwin, <a title="cygwin.com" href="http://cygwin.com">http://cygwin.com</a></li>
<li>Ssh package for cygwin, if you need to install mcabber elsewhere and then connect to it remotely.</li>
</ul>
<p>If cygwin and ssh are new to you, <a title="http://inside.mines.edu/~gmurray/HowTo/sshNotes.html" href="http://inside.mines.edu/~gmurray/HowTo/sshNotes.html">read this</a> to get up to speed.</p>
<p>If you are setting up mcabber on a host machine, you&#8217;ll want to setup ssh as a service or daemon on that machine as well.  Use the ssh-host-config script to do that.</p>
<p>Quickly, here&#8217;s how to get going.</p>
<ol>
<li>Get the latest updates for cygwin using the cygwin setup program.  I was missing the latest glib and I didn&#8217;t have pkg-config.</li>
<li>Download the mcabber source from the website.  Run the configure script with no arguments.  Take note of any errors; they are most likely related to missing libraries.  Get these libraries with the cygwin setup program.</li>
<li>Once configure is successful, you should be able to run make, and then make install with no problems.</li>
<li>Create a mcabberrc file in the directory ~/.mcabber, note that the filename is &#8220;mcabberrc&#8221; and not &#8220;.mcabberrc&#8221;.</li>
<li>Put the following into the mcabberrc file to configure it for Google Talk.</li>
</ol>
<p>set username = &lt;your username at gmail dot com&gt;<br />
set server = talk.google.com<br />
set ssl = 1<br />
set ssl_verify = 0<br />
set port = 5223</p>
<p>That&#8217;s all there is to it.  Type mcabber and it should prompt you for your password and then connect.</p>
<p>You&#8217;ll see 3 different &#8220;panes&#8221; or frames and the command prompt at the bottom.  Scroll through your contacts with Page Up and Page Down.  When you&#8217;ve selected a contact, just start typing in the command prompt to send messages.  The program commands start with a &#8220;/&#8221; character, type &#8220;man mcabber&#8221; for a complete list of commands.  If you&#8217;re in mcabber, you can type &#8220;/help&#8221; for help on specific mcabber commands.</p>
<p>That&#8217;s all for now!</p>
<p>-eokuwwy</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/revert-to-console-for-im-gtalk-example-using-mcabber/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Basic Pine Gmail Config</title>
		<link>http://www.reverttoconsole.com/blog/nix/basic-pine-gmail-config/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/basic-pine-gmail-config/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 15:44:01 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[*NIX]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=378</guid>
		<description><![CDATA[I always forget this, and periodically find myself setting up a new pine client. So rather than digging around on the web each time, I&#8217;m adding my notes here: Create a .pinerc file, maybe a custom one for gmail like .gmailpinerc POP3 smtp-server=smtp.gmail.com/user=user@gmail.com/ssl inbox-path={pop.gmail.com/pop3/ssl/user=user@gmail.com}inbox IMAP smtp-server=smtp.gmail.com:587/tls/user= user@gmail.com inbox-path={imap.gmail.com:993/ssl/novalidate-cert/user= user@gmail.com}inbox There are a host of other options that [...]]]></description>
			<content:encoded><![CDATA[<p>I always forget this, and periodically find myself setting up a new pine client. So rather than digging around on the web each time, I&#8217;m adding my notes here:</p>
<p>Create a .pinerc file, maybe a custom one for gmail like .gmailpinerc</p>
<p>POP3</p>
<p><strong>smtp-server=smtp.gmail.com/user=user@gmail.com/ssl<br />
</strong></p>
<p><strong>inbox-path={pop.gmail.com/pop3/ssl/user=user@gmail.com}inbox</strong></p>
<p>IMAP</p>
<p><strong>smtp-server=smtp.gmail.com:587/tls/user= user@gmail.com</strong></p>
<p><strong>inbox-path={imap.gmail.com:993/ssl/novalidate-cert/user= user@gmail.com}inbox</strong></p>
<p>There are a host of other options that can be configured, but this is a good start.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F&amp;title=Basic+Pine+Gmail+Config" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F&amp;title=Basic+Pine+Gmail+Config" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F&amp;title=Basic+Pine+Gmail+Config" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F&amp;title=Basic+Pine+Gmail+Config" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F&amp;title=Basic+Pine+Gmail+Config', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F&amp;title=Basic+Pine+Gmail+Config" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fbasic-pine-gmail-config%2F&amp;title=Basic+Pine+Gmail+Config" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/basic-pine-gmail-config/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>&#8220;Revert to Console&#8221; for Language Translation</title>
		<link>http://www.reverttoconsole.com/blog/nix/revert-to-console-for-language-translation/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/revert-to-console-for-language-translation/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 16:05:04 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=354</guid>
		<description><![CDATA[So you might be sitting around asking yourself, &#8220;Do I really need a web browser or collection of clunky travel dictionaries to translate to and from different languages of the world? Isn&#8217;t there a command line tool that can do the same thing and make my life easier, while making me even more awesome at [...]]]></description>
			<content:encoded><![CDATA[<p>So you might be sitting around asking yourself,<br />
&#8220;Do I really need a web browser or collection of clunky travel dictionaries to translate to and from different languages of the world?  Isn&#8217;t there a command line tool that can do the same thing and make my life easier, while making me even more awesome at the same time?&#8221;</p>
<p>The answer is YES!</p>
<p>The <a href="http://savannah.nongnu.org/projects/twandgtw">Translate Word and Graphical TW project</a> is your gateway to having superior translation capabilities right in your CONSOLE!</p>
<p>Download tw from <a href="http://savannah.nongnu.org/files/?group=twandgtw">http://savannah.nongnu.org/files/?group=twandgtw</a>.<br />
I&#8217;m using tw-0.1.3.tar.bz2.</p>
<p>Major Dependencies<br />
elinks<br />
<a href="http://elinks.or.cz/download">http://elinks.or.cz/download</a><br />
I&#8217;m using elinks-0.11.5.tar.bz2.</p>
<p>I&#8217;m using Cygwin and I was missing the following:<br />
curl<br />
libiconv<br />
util-linux random utils (For the getopt() function)</p>
<p>The above Cygwin packages can easily be obtained through the Cygwin setup program.</p>
<p>1. Extract elinks.  Build it starting with &#8220;sh configure&#8221;.  Then type &#8220;make&#8221;.  After it finishes, type &#8220;make install&#8221;.</p>
<p>2. Repeat step 1 with tw.</p>
<p>3. Type &#8220;tw -h&#8221; to test that everything is installed correctly.</p>
<p>4. If everything went well, try typing &#8220;tw en-es hello&#8221; and you should get the following output:<br />
hello : hola</p>
<p>You&#8217;re all set!  Now you can quickly translate between many languages straight from your bash shell.  Type &#8220;tw -l&#8221; to see a list of &#8220;all&#8221; the languages.</p>
<p>Customized Script for Google Translate</p>
<p>Google&#8217;s translate service is one of the most comprehensive language translators available.  A major benefit of using Google&#8217;s translation service is that you can pass in as much text as you want; simply surround the text with quotes.  Even though tw does not list all of the languages that Google supports, it is still a bash script that parses input parameters, and it does not do any validation.  You can append anything you want to the argument &#8220;translate.google.com&#8221;.  For instance, Croatian is not listed as one of the languages (&#8220;hr&#8221;).  However, all you need to do is append the appropriate language pair to the end of the argument string, like so:<br />
$ tw translate.google.com.en-hr hello<br />
zdravo</p>
<p>To make this a bit more user-friendly, I have created a simple wrapper script (twg) for tw that only uses Google&#8217;s translate service.  It works just like tw, except you do not have to type &#8220;translate.google.com&#8221;.  You only need to put in the language pair.  For example:<br />
$ twg en-es &#8220;Hello World&#8221;<br />
Hola Mundo</p>
<p>Type &#8220;twg -l&#8221; to get a complete list of supported languages. You can find more details about featured languages at <a href="http://www.google.com/help/faq_translation.html#langpairs">http://www.google.com/help/faq_translation.html#langpairs</a>.</p>
<pre class="brush: php">
#!/bin/bash
# author: eokuwwy
# http://reverttoconsole.com
# description: customized tw wrapper script that uses google translate&lt;/code&gt;

if [ &quot;$1&quot; = &quot;-l&quot; ];
then
echo &quot;Arabic=ar&quot;;
echo &quot;Bulgarian=bg&quot;;
echo &quot;Catalan=ca&quot;;
echo &quot;Chinese=zh-cn&quot;;
echo &quot;Chinese=zh-tw&quot;;
echo &quot;Croation=hr&quot;;
echo &quot;Czech=cs&quot;;
echo &quot;Danish=da&quot;;
echo &quot;Dutch=nl&quot;;
echo &quot;English=en&quot;;
echo &quot;Filipino=tl&quot;;
echo &quot;Finnish=fi&quot;;
echo &quot;French=fr&quot;;
echo &quot;German=de&quot;;
echo &quot;Greek=el&quot;;
echo &quot;Hebrew=iw&quot;;
echo &quot;Hindi=hi&quot;;
echo &quot;Indonesian=id&quot;;
echo &quot;Italian=it&quot;;
echo &quot;Japanese=ja&quot;;
echo &quot;Korean=ko&quot;;
echo &quot;Latvian=lv&quot;;
echo &quot;Lithuanian=lt&quot;;
echo &quot;Norwegian=no&quot;;
echo &quot;Polish=pl&quot;;
echo &quot;Portuguese=pt-BR&quot;;
echo &quot;Romanian=ro&quot;;
echo &quot;Russian=ru&quot;;
echo &quot;Serbian=sr&quot;;
echo &quot;Slovak=sk&quot;;
echo &quot;Slovenian=sl&quot;;
echo &quot;Spanish=es&quot;;
echo &quot;Swedish=sv&quot;;
echo &quot;Ukranian=uk&quot;;
echo &quot;Vietnamese=vi&quot;;
elif [ &quot;$1&quot; = &quot;-h&quot; -o -z &quot;$1&quot; ];
then
echo &quot;Usage: twg [sourcelang-destlang (i.e. en-es)] [term]&quot;;
echo &quot;twg -h (shows help)&quot;;
echo &quot;twg -l (shows language list)&quot;;
else
tw translate.google.com.$1 &quot;$2&quot;;
fi
</pre>
<p>Happy command line translation!  Now jailbreak (at your own risk) your iPhone/Blackberry/PDA and put tw on there!</p>
<p>$ twg en-es &#8220;peace out&#8221;<br />
a la paz<br />
-eokuwwy</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/revert-to-console-for-language-translation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Screen</title>
		<link>http://www.reverttoconsole.com/blog/nix/my-screen/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/my-screen/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 17:27:30 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=297</guid>
		<description><![CDATA[Screen is a great tool for command-line usage, and is also available for cygwin. If you enjoy using the command line, and haven&#8217;t checked out screen, I highly recommend it. I found some of the commands and configuration changes a little difficult to remember, so I&#8217;m adding them here. First of all, the main screen [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gnu.org/software/screen/">Screen</a> is a great tool for command-line usage, and is also available for <a href="http://www.cygwin.com/">cygwin</a>. If you enjoy using the command line, and haven&#8217;t checked out screen, I highly recommend it. I found some of the commands and configuration changes a little difficult to remember, so I&#8217;m adding them here.</p>
<p>First of all, the main screen escape key is ctrl-a. That&#8217;s all well and good, unless you&#8217;re an emacs user, then it&#8217;s downright offensive (ctrl-a is the emacs command to go to the beginning of a line- one I happen to use a lot). Fortunately it&#8217;s easy enough to change. I added a screenrc file that looks like this:</p>
<pre class="brush: bash">
# ctrl-/ is my preferred shortcut key
escape \034\034
# turn off visual bell
vbell off
caption always &quot;%H %= %-w%L&gt;%{= BW}%n*%t%{-}%52&lt;%+w %L=&quot;
startup_message off
deflogin on
shell -/bin/bash
</pre>
<p>It&#8217;s easy enough to switch between screens from a single (rxvt) shell now, but as an emacs user I naturally enjoy having my screen split so I can multitask. It took me a while to figure out how to do that effectively with screen.</p>
<p><strong>ctrl-/ S</strong> splits the screen.<br />
<strong>ctrl-/ n</strong> switches to the next screen, but does it within the current region, so it&#8217;s not like M-x o in emacs.<br />
<strong>ctrl-/ tab</strong> switches between the split regions, just like M-x o in emacs.<br />
<string>ctrl-/ X</strong> &#8220;unsplits&#8221; the screen.</p>
<p><strong>References</strong></p>
<ul>
<li><a href="http://www.mattcutts.com/blog/a-quick-tutorial-on-screen/">A Quick Tutorial</a></li>
<li><a href="http://www.mattcutts.com/blog/screen-power-tips-screenrc/">Some good screenrc tips</a></li>
<li><a href="http://www.catonmat.net/blog/wp-content/plugins/wp-downloadMonitor/user_uploads/screen.cheat.sheet.pdf">Screen Cheat Sheet pdf</a></li>
</ul>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F&amp;title=My+Screen" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F&amp;title=My+Screen" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F&amp;title=My+Screen" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F&amp;title=My+Screen" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F&amp;title=My+Screen', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F&amp;title=My+Screen" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmy-screen%2F&amp;title=My+Screen" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/my-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs Macros 101</title>
		<link>http://www.reverttoconsole.com/blog/nix/emacs-macros-101/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/emacs-macros-101/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 17:03:04 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=295</guid>
		<description><![CDATA[Macros are really useful for programming, but since adopting Eclipse I haven&#8217;t been using them as much, much to the detriment of my fingers. For a while I used Notepad++ for macros. Macros are easy to use with Notepad++, but unfortunately you&#8217;re limited to trivially simple macros- for example, you can&#8217;t &#8220;search&#8221; your way through [...]]]></description>
			<content:encoded><![CDATA[<p>Macros are really useful for programming, but since adopting Eclipse I haven&#8217;t been using them as much, much to the detriment of my fingers.</p>
<p>For a while I used Notepad++ for macros. Macros are easy to use with Notepad++, but unfortunately you&#8217;re limited to trivially simple macros- for example, you can&#8217;t &#8220;search&#8221; your way through a file changing every double-quote to a single-quote. In Emacs, you can do whatever you do in emacs as a macro.</p>
<p>&#8220;C-x (&#8221; is analogous to the record selection in Notepad++. It means your next commands will be recorded as a macro.</p>
<p>When you&#8217;re done, &#8220;C-x )&#8221; tells emacs to stop recording.</p>
<p>&#8220;C-x e&#8221; runs the macro you&#8217;ve just recorded.</p>
<p>Once you create a macro, you&#8217;ll probably want to run it more than once&#8230; &#8220;C-u some-number your-command&#8221; will execute &#8220;your-command&#8221; exactly &#8220;some-number&#8221; times. This can be used to run the command &#8220;call-last-kbd-macro&#8221;. So, for example &#8220;C-u 1000 C-x e&#8221; will run the macro you just created 1000 times (or until the end of the file, whichever comes first).</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F&amp;title=Emacs+Macros+101" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F&amp;title=Emacs+Macros+101" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F&amp;title=Emacs+Macros+101" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F&amp;title=Emacs+Macros+101" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F&amp;title=Emacs+Macros+101', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F&amp;title=Emacs+Macros+101" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Femacs-macros-101%2F&amp;title=Emacs+Macros+101" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/emacs-macros-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving On From Windows</title>
		<link>http://www.reverttoconsole.com/blog/nix/moving-on-from-windows/</link>
		<comments>http://www.reverttoconsole.com/blog/nix/moving-on-from-windows/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 21:57:35 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[*NIX]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=241</guid>
		<description><![CDATA[I can&#8217;t stand the thought of using Vista. I am an XP user; by which I mean to say I get by using cygwin and some of the Windows apps. But I&#8217;ve used Vista enough for me to know that I must draw the proverbial line in the sand there. XP will be the last [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t stand the thought of using Vista. I am an XP user; by which I mean to say I get by using cygwin and some of the Windows apps. But I&#8217;ve used Vista enough for me to know that I must draw the proverbial line in the sand there.</p>
<p>XP will be the last Windows OS I will ever use.</p>
<p>That&#8217;s a big statement for me. I&#8217;ve been running GNU/Linux servers and some desktop OS for years, but I&#8217;ve never gone completely Windows-free. But it is definitely time. Aside: I know many readers use Macs. And I will concede there is a strong argument to be made to do that. But look, I&#8217;ll be honest- I just don&#8217;t have that kind of money to spend on a computer right now.</p>
<p>So it&#8217;s time to say hello to the GNU/Linux desktop.</p>
<p>Now, after thinking about this a little bit, I realized my goal is not to mimic Windows, and I&#8217;m not really interested in a rich UI look and feel. I don&#8217;t need to be &#8220;wowed&#8221; by the graphics; I want a new computing experience. In light of that, I decided to skip Ubuntu. I also didn&#8217;t want a million packages I knew nothing about. I wanted more control over my computing, and in light of that I decided to skip Fedora and Suse. In the end I installed <a href="http://www.blagblagblag.org/">Blag</a>, which claims to use 100% free software, with the exception I suppose of the Linux kernel.</p>
<p>Anyway, it seems like a good place to start. I immediately tarnished this image by installing my jdk. I installed emacs, which for some reason worked via yum install emacs but not via the package manager. I&#8217;ve also installed <a href="http://www.easyeclipse.org/site/distributions/index.html">easyeclipse</a> expert java version.</p>
<p>I&#8217;ve had trouble getting the wireless working on my laptop, and also don&#8217;t seem to have any sound at the moment. I&#8217;ll let you know how it goes&#8230;</p>
<p><strong>UPDATE</strong><br />
BLAG didn&#8217;t last long. I wanted to run eclipse, but the distribution I wanted to use required GTK+ 2.2.1. The only GTK+ reference I could find, the GTK+ website, had GTK 1.2 as the latest release. I fished around on a few different yum repositories without any luck. Also, the sound didn&#8217;t work in BLAG.</p>
<p>I&#8217;ve since installed Suse, and now have bluetooth, wireless, and sound. I&#8217;m using the KDE desktop instead of Gnome.</p>
<p><strong>UPDATE</strong><br />
I just realized I was reading the latest gtk+ release as <i>2.1.4</i> instead of what it really is, <i>2.14</i>. Wow, that really threw me off!</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F&amp;title=Moving+On+From+Windows" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F&amp;title=Moving+On+From+Windows" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F&amp;title=Moving+On+From+Windows" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F&amp;title=Moving+On+From+Windows" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F&amp;title=Moving+On+From+Windows', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F&amp;title=Moving+On+From+Windows" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fnix%2Fmoving-on-from-windows%2F&amp;title=Moving+On+From+Windows" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/nix/moving-on-from-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
