<?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>Random Geekage &#187; bash</title>
	<atom:link href="http://kevinisageek.org/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevinisageek.org</link>
	<description>Randomness, geekery and whatever else I feel like</description>
	<lastBuildDate>Thu, 20 May 2010 10:29:06 +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>Battery level in Bash prompt</title>
		<link>http://kevinisageek.org/2008/10/17/battery-level-in-bash-prompt/</link>
		<comments>http://kevinisageek.org/2008/10/17/battery-level-in-bash-prompt/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 14:33:16 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[acpi]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[prompt]]></category>

		<guid isPermaLink="false">http://kevinisageek.org/weblog/?p=266</guid>
		<description><![CDATA[If you are like me and want to run mainly in command line while using a laptop, you might have trouble finding out how much charge is left in your laptop battery. GUIs always have some sort of widget that reports battery info but the command line is sorely lacking. It would suck to be [...]]]></description>
			<content:encoded><![CDATA[<p>If you are like me and want to run mainly in command line while using a laptop, you might have trouble finding out how much charge is left in your laptop battery. GUIs always have some sort of widget that reports battery info but the command line is sorely lacking. It would suck to be typing away then your screen going dead in the middle of something important.</p>
<p>I have been looking for a simple solution for a while and came up with one. The idea is to print the output of the acpi command in your bash prompt. It is a pretty simple thing to do.</p>
<p>[ `acpi` ] is the fragment of text you need to put into the PS1 variable in your .bashrc file. My prompt looks like PS1=&#8217;[ `acpi` ]\n${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ &#8216;</p>
<p>Looks complicated but the bulk of it is colour making the prompt look better. My prompt looks as such:</p>
<p><img src="http://kevinisageek.org/weblog/wp-content/uploads/2008/10/battery.png" alt="" /></p>
<p>Hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevinisageek.org/2008/10/17/battery-level-in-bash-prompt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I love bash</title>
		<link>http://kevinisageek.org/2008/04/16/i-love-bash/</link>
		<comments>http://kevinisageek.org/2008/04/16/i-love-bash/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 20:22:46 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.kevinisageek.org/weblog/?p=53</guid>
		<description><![CDATA[I really do love the Bash shell, particularly the ability to do scripting. I wanted to make all the files in a directory have lowercase filenames. It gets tedious when doing it by hand and there is no native way to do i in Nautilus (file browser in Gnome). Thunar (Xfce window manager file manager) [...]]]></description>
			<content:encoded><![CDATA[<p>I really do love the Bash shell, particularly the ability to do scripting.  I wanted to make all the files in a directory have lowercase filenames. It gets tedious when doing it by hand and there is no native way to do i in Nautilus (file browser in Gnome). Thunar (Xfce window manager file manager) does have this facility but I&#8217;m not gonna install it and all its dependancies. So with a quick google search I found a wee snippet of bash script to do the job for me. Presenting dir2lowercase:</p>
<blockquote><p>#!/bin/bash<br />
# Script to convert all the files in the current directory to lowercase<br />
# Code taken from http://webxadmin.free.fr/article/shell-rename-all-files-in-subdirectories-to-lowe-135.php</p>
<p>for f in *; do<br />
g=`expr &#8220;xxx$f&#8221; : &#8216;xxx\(.*\)&#8217; | tr &#8216;[A-Z]&#8216; &#8216;[a-z]&#8216;`<br />
mv &#8220;$f&#8221; &#8220;$g&#8221;<br />
done</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://kevinisageek.org/2008/04/16/i-love-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
