<?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>code.random() &#187; bash</title>
	<atom:link href="http://code.pui.ch/category/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.pui.ch</link>
	<description>Random code-snippets and tips</description>
	<lastBuildDate>Sun, 04 Apr 2010 21:42:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>sched 20 &#8220;pizza is ready&#8221;</title>
		<link>http://code.pui.ch/2007/01/19/sched-20-pizza-is-ready/</link>
		<comments>http://code.pui.ch/2007/01/19/sched-20-pizza-is-ready/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 13:16:09 +0000</pubDate>
		<dc:creator>philipp.keller</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[organizing]]></category>

		<guid isPermaLink="false">http://code.pui.ch/2007/01/19/sched-20-pizza-is-ready/</guid>
		<description><![CDATA[While coding I often want to set a timer to be reminded when

the pizza in the oven ready
I tried too long to get my bell-and-whistle-but-not-really-necessary-feature implemented (while programming I often don't stop following one certain track until something stops me)
it's time to leave to catch the bus

On linux, the easiest way is to have this [...]]]></description>
			<content:encoded><![CDATA[<p>While coding I often want to set a timer to be reminded when</p>
<ul>
<li>the pizza in the oven ready</li>
<li>I tried too long to get my bell-and-whistle-but-not-really-necessary-feature implemented (while programming I often don't stop following one certain track until something stops me)</li>
<li>it's time to leave to catch the bus</li>
</ul>
<p>On linux, the easiest way is to have this in your ~/.bashrc-File:</p>
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; ">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sched <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A; ">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span>sleep $<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>$<span style="color:#800000;color:#800000;">1</span>*<span style="color:#800000;color:#800000;">60</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; xmessage <span style="color:#CC0000;">"$2"</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; ">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>For having the popup message "pizza is ready" in 20 minutes, type <code>sched 20 "pizza is ready"</code>.</p>
<p>For the bash-beginners (as me): <code>$((math expr))</code> evaluates the math expression, i.e. 60*5 becomes 300. The parentheses around sleep and xmessage start a new sub process. So this still works if you quit the shell you started <code>sched</code> in.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.pui.ch/2007/01/19/sched-20-pizza-is-ready/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
