<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>systemBash</title>
	
	<link>http://systembash.com</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Mon, 16 Aug 2010 12:34:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/systembash" /><feedburner:info uri="systembash" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>39.978456</geo:lat><geo:long>-75.822755</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/systembash" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsystembash" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><item>
		<title>A phpBB 3 iPhone Style Theme With Option to Disable</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/_AV7OArLAkU/</link>
		<comments>http://systembash.com/content/phpbb-3-iphone-style-theme-option-to-disable/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 12:34:37 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[phpbb]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=707</guid>
		<description><![CDATA[A forum that I am an adminstrator for has been clamoring for an iPhone theme (style) for a long time now. In the past, I hadn't seen any usable iPhone template for phpBB3, until now.

View this entire post to view my modifications to a theme switcher for mobile devices, so that the end user can disable a mobile theme for their login if they should choose to do so. ]]></description>
			<content:encoded><![CDATA[<p><img src="http://systembash.com/wp-content/uploads/2010/08/photo-200x300.png" alt="phpBB iPhone theme style" title="PHPBB iPhone Theme" width="200" height="300" class="alignright size-medium wp-image-711" />A forum that I am an adminstrator for has been clamoring for an iPhone theme (style) for a long time now. In the past, I hadn&#8217;t seen any usable iPhone template for phpBB3, until now.</p>
<p>The theme is hosted on Google code and is named <a href="http://code.google.com/p/phpbb-iphone-style/">phpbb-iphone-style</a>. It is downloadable <a href="http://code.google.com/p/phpbb-iphone-style/downloads/list">here</a> and was last updated June 18th, as of today.</p>
<p>The theme works wonderfully on the iPhone. However, the issue that I ran into is automatically displaying it for mobile browsers, such as the iPhone, Android and other platforms.</p>
<p>Fortunately there is a modification you can make to the phpbb code which is effectively a theme switcher for mobile browsers. The how to is located within the download file for the theme above.</p>
<h3>What if a user wants to turn off the mobile style?</h3>
<p>I modified the code to allow a user to set an option on their profile to permentently disable the theme when logged in on a mobile browser.</p>
<p>First, install the style as described above. As part of the switcher, you need to find out the theme ID. You can do so, after installing the style, by hovering over the &#8216;Detail&#8217; tab in the ACP (Administrator Control Panel) and looking for the &#8216;id&#8217; variable. In the example below it is &#8217;6&#8242;.</p>
<p>Once the theme is installed, move over to the &#8220;Users and Groups&#8221; tab, and then the &#8220;Custom Profile Fields&#8221; area. At the bottom of this page there is a box to add a new profile field. Type &#8216;disable_mobile&#8217; as the name, and Boolean (Yes/No) as the type and click add.</p>
<p>For the options, I selected:</p>
<ul>
<li>Publicly display profile field: No</li>
<li>Display in user control panel: Checked</li>
<li>Display on registration screen: Unchecked</li>
<li>Display on viewtopic screen: Unchecked</li>
<li>Required field: Unchecked</li>
<li>Hide profile field: Unchecked</li>
<li>Field name/title presented to the user: Disable Mobile Browser</li>
<li>Field description: When viewing on a mobile device (iPhone, Android, etc), clicking &#8216;yes&#8217; will disable the mobile browser.</li>
<li>Entries: First option: Yes, Second option: No</li>
</ul>
<p>On the second screen select the following items:</p>
<ul>
<li>Field type: Radio Buttons</li>
<li>Default value: no</li>
</ul>
<p>Save your custom profile field.</p>
<p>It will end up looking like this in the profile control panel of the end user:</p>
<p><center><img src="http://systembash.com/wp-content/uploads/2010/08/phpbb-style-disable.png" alt="phpbb iphone style disabler" title="phpbb-style-disable" width="500" height="107" class="size-full wp-image-710" /></center></p>
<p>Now the fun part, adding the code to your install to select which mobile browser to use automatically.</p>
<p>Back up, then open install dir/includes/session.php</p>
<p>Around line 1468 in the function setup</p>
<pre class="prettyprint">        /**
        * Setup basic user-specific items (style, language, ...)
        */
        function setup($lang_set = false, $style = false)
        {</pre>
<p>Replace </p>
<pre class="prettyprint">global $db, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache;</pre>
<p>with</p>
<pre class="prettyprint">global $db, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache, $user;

//-----Begin phone detection &amp; redirection code-----

                $user->get_profile_fields( $user->data['user_id'] );
                $user_fields = $user->profile_fields;

                if (!($user_fields['pf_disable_mobile'] == 1)) {  

                        //id of the iphone/mobile theme - SELECT THIS FROM YOUR STYLES
                        $mobilestyleid = 6;

                        //Fetch the users browser
                        $user_browser = strtolower($this->browser);

                        //List of mobile user-agent keywords
                        $browsers_array = array('240x320', '320x240','blackberry', 'iemobile', 'minimobile', 'mobile', 'opera mini', 'pda', 'phone', 'pocket', 'psp', 'symbian', 't-shark', 'wireless');

                        //Check for the user-agent in the list of mobile user-agents
                        foreach ($browsers_array as $ua_match) {
                                if (strpos($user_browser, $ua_match) !== false) {  //a match
                                        $style = $mobilestyleid;
                                        $this->data['is_mobile'] = true;
                                        break;
                                }
                        }

                }

                //-----End phone detection/redirection code-----</pre>
<p><strong>Make sure to replace $mobilestyleid = 6 with your style id number!</strong></p>
<p>Save your file. Test out the modifications on your phone, you should be presented with the mobile version on reload (make sure to purge any cache if you don&#8217;t see it right away). </p>
<p>Finally go into your profile and select the &#8216;disable mobile browser&#8217; option and make sure it reverts back to your regular default theme. </p>
<p>Let me know if you have any problems implementing this but it has worked great for this phpbb forum!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=_AV7OArLAkU:DrI6KzUZP6s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=_AV7OArLAkU:DrI6KzUZP6s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_AV7OArLAkU:DrI6KzUZP6s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=_AV7OArLAkU:DrI6KzUZP6s:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_AV7OArLAkU:DrI6KzUZP6s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_AV7OArLAkU:DrI6KzUZP6s:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=_AV7OArLAkU:DrI6KzUZP6s:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_AV7OArLAkU:DrI6KzUZP6s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/_AV7OArLAkU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/phpbb-3-iphone-style-theme-option-to-disable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://systembash.com/content/phpbb-3-iphone-style-theme-option-to-disable/</feedburner:origLink></item>
		<item>
		<title>Walled Gardens and Currency</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/-LvySi5FM8k/</link>
		<comments>http://systembash.com/content/walled-gardens-and-currency/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 11:57:43 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[walled gardens]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=697</guid>
		<description><![CDATA[Walled Gardens are never very effective. They may work for a period of time to isolate a nation or organization, but they inevitably fail. On the short list that comes to mind: The Great Wall of China, U.S. Isolationism in the 19th Century and AOL in the 90&#8242;s. Countries, by very definition, are walled gardens. [...]]]></description>
			<content:encoded><![CDATA[<p>Walled Gardens are never very effective. They may work for a period of time to isolate a nation or organization, but they inevitably fail. On the short list that comes to mind: The Great Wall of China, U.S. Isolationism in the 19th Century and AOL in the 90&#8242;s.</p>
<p>Countries, by very definition, are walled gardens. Each has its own rules, laws and customs; and each defines and fights for their border. In the offline world, this may work. However, online and via the internet, these restrictions are reduced to almost nothing. Something that is legal in your country may be illegal in another, and through technology the internet may me accessed from anywhere on earth.</p>
<p>Currency is yet another walled garden. You have a way to pay for products or services, yet a certain type of money is only good in a certain area. To use multiple currencies you need to calculate an exchange rate, and convert that currency. This is an inefficient way to basically compensate someone for a service or physical item across borders.</p>
<p>I believe that the world is ripe for a global cross border currency. Countries are unable to issue such a cross-border product because they will always have their own interests at hand. Many times countries have vied to have &#8216;their&#8217; currency become the standard one. The closest thing we have to that now is the Euro, which you might actually consider once of the first cross-border currencies and a precursor to the <em>next big thing</em>.</p>
<p>Companies on the other hand, specifically internet non-physical companies such as Google, Twitter and the like, do not have these physical restrictions. On the world-wide internet, such sites are generally accessible equally unless a country outright blocks them. A &#8216;Google&#8217; or other online currency which is valid for online services only, could become a standard payment system across the internet. Google has been on a <a href="http://techcrunch.com/2010/08/09/google-aquires-jambool-social-gold/">purchasing spree</a> of companies dealing with just this topic.</p>
<p>Gaming systems already have these payment systems in place. Many MMORPGs have currency which is only valid in-game. Since money is created in-game and also spent in game it does not matter what country you are from and what your real currency situation is like. <a href="http://craphound.com/">Cory Doctorow</a> recently wrote about this very situation in his fictional book <a href="http://craphound.com/ftw/download/">For The Win</a> (it is downloadable for free).</p>
<p>An internet currency would work much the same way. Let&#8217;s say you are providing some service online, and you are paid with this online internet currency. You can then use the currency to pay other people for your services. The idea of an internet based currency is <a href="http://www.transaction.net/money/internet/">not new</a>, but I think the idea has come around recently.</p>
<p>I think the world is ripe for such an online currency. Only a company with a <em>sterling reputation</em> can pull it off, because the stability of this internet currency is innately tied into whether an individual &#8216;buying into&#8217; the system can rely on that money to be there in a year or 10 years. Only a few companies have that reputation, and Google is one of them. Otherwise you have problems such as the ones at the beginning of last decade with <a href="http://www.usatoday.com/tech/news/2001-08-22-ebrief.htm">Flooz&#8217;s issues</a>.</p>
<p>Was Flooz just ahead of its time? We will soon find out.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=-LvySi5FM8k:WzS5MY9Xx7E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=-LvySi5FM8k:WzS5MY9Xx7E:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=-LvySi5FM8k:WzS5MY9Xx7E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=-LvySi5FM8k:WzS5MY9Xx7E:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=-LvySi5FM8k:WzS5MY9Xx7E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=-LvySi5FM8k:WzS5MY9Xx7E:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=-LvySi5FM8k:WzS5MY9Xx7E:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=-LvySi5FM8k:WzS5MY9Xx7E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/-LvySi5FM8k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/walled-gardens-and-currency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://systembash.com/content/walled-gardens-and-currency/</feedburner:origLink></item>
		<item>
		<title>Another Bash One Liner To Delete Old Directories</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/kMG0gb9Kldo/</link>
		<comments>http://systembash.com/content/another-bash-one-liner-to-delete-old-directories/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 22:05:58 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[oneliner]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=685</guid>
		<description><![CDATA[We received a tip from blog readers Christian and Michael for alternatives to the command to delete all directories older than a certain period of time. These both work in bash and can be used in scripts to clean up old backup directories or any situation where you need to delete old directories from the [...]]]></description>
			<content:encoded><![CDATA[<p>We received a tip from blog readers Christian and Michael for alternatives to the <a href="http://systembash.com/content/delete-directories-older-than-week/">command to delete all directories older than a certain period of time</a>. These both work in bash and can be used in scripts to clean up old backup directories or any situation where you need to delete old directories from the command line.</p>
<p>From Christian:</p>
<pre>find /home/backup/ -maxdepth 1 -type d -mtime +7 -exec rm -r {} \;</pre>
<p>From Michael:</p>
<pre>find /home/backup/ -maxdepth 1 -type d -mtime +7 -exec echo “Removing Directory =&gt; {}” \; -exec rm -rf “{}” \;</pre>
<p>The first one works quietly, while the second one will display what is being deleted. These are probably faster than putting it into a for loop, so feel free to use whatever works best in your particular situation!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=kMG0gb9Kldo:-_-dX6KSeeA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=kMG0gb9Kldo:-_-dX6KSeeA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kMG0gb9Kldo:-_-dX6KSeeA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=kMG0gb9Kldo:-_-dX6KSeeA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kMG0gb9Kldo:-_-dX6KSeeA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kMG0gb9Kldo:-_-dX6KSeeA:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=kMG0gb9Kldo:-_-dX6KSeeA:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kMG0gb9Kldo:-_-dX6KSeeA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/kMG0gb9Kldo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/another-bash-one-liner-to-delete-old-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://systembash.com/content/another-bash-one-liner-to-delete-old-directories/</feedburner:origLink></item>
		<item>
		<title>Thoughts On the Google TV Platform</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/M4PJ3Fgb5II/</link>
		<comments>http://systembash.com/content/thoughts-on-the-google-tv-platform/#comments</comments>
		<pubDate>Thu, 20 May 2010 17:59:22 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Television]]></category>
		<category><![CDATA[google tv]]></category>
		<category><![CDATA[googletv]]></category>
		<category><![CDATA[htpc]]></category>
		<category><![CDATA[iptv]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=679</guid>
		<description><![CDATA[Just watched the Google IO stream regarding the release of Google TV.  My thoughts: Good: The platform is open. This is the way to go, and will allow developers to go hog wild and develop things that even the Google engineers couldn&#8217;t envision. TV/Web Integration. The Google TV platform appears to have great web and [...]]]></description>
			<content:encoded><![CDATA[<p>Just watched the <a href="http://www.youtube.com/googledevelopers">Google IO stream</a> regarding the release of <a href="http://googleblog.blogspot.com/2010/05/announcing-google-tv-tv-meets-web-web.html">Google TV</a>.  My thoughts:</p>
<p><span style="text-decoration: underline;">Good:</span></p>
<ul>
<li>The platform is open. This is the way to go, and will allow developers to go hog wild and develop things that even the Google engineers couldn&#8217;t envision.</li>
<li>TV/Web Integration. The Google TV platform appears to have great web and video integration, including live TV. The overlays look beautiful and web/TV switches effortlessly. But that basically makes it <a href="http://en.wikipedia.org/wiki/MSN_TV">WebTV</a>.</li>
<li>Working with hardware partners. This gives the platform a much better chance of seeing the light of day. It appears they are working with Sony, Dish, Logitech and other hardware companies.</li>
<li>The Android market. Integration with this means you already have tons of apps at your disposal on your system.</li>
<li>Search integration. Will make it easy to find both local and online content.</li>
</ul>
<p><span style="text-decoration: underline;">Bad:</span></p>
<ul>
<li>Needing an existing cablebox to bring in live TV. This is an uncessessary step &#8211; you should be able to bring in Live TV streams using a <a href="http://en.wikipedia.org/wiki/CableCARD">CableCard</a>. Could support for this be forthcoming?</li>
<li>Uses existing TV infrastructure. The future is in IP TV.</li>
</ul>
<p><span style="text-decoration: underline;">Questions:</span></p>
<ul>
<li>How expensive will the box be and will it be available from cable/satellite providers? If available from television providers (at least Dish) then it will be available for a monthly &#8216;rental&#8217; fee. If Google tries to sell this as a stand-alone product, ala Tivo, it will be a bigger up-front cost that many consumers are not used to paying. However, <strong>Google may be able to make this cheaper than we think</strong>, because they subsidize services from ad revenue. Advertisers are willing to pay for information such as what viewers are watching. <em>Google will be sitting on a goldmine of data.</em></li>
<li>How will this impact other &#8220;Television&#8221; set tops such as Tivo, BeyondTV, Boxee, MythTV? It greatly depends on adoption rates, cost and utility.</li>
</ul>
<p>Regarding the issue with the existing TV infrastructure, this product could be revolutionary. I&#8217;m not sure if this is because they are trying to avoid stepping on the big cable providers toes but with a device like this the existing cable network is unnecessary. <strong>Google owns a lot of fiber, and therefore a lot of bandwidth</strong>. They could offer their own live IPTV offering, and it could be available directly on the Google TV platform. This is probably where they are aiming to go in 2 or more years. Its prohibitive to many companies at a reasonable rate because the cost to stream high definition television to many homes is great.</p>
<p>YouTube essentially already has the infrastructure in place for IPTV. They already have the ability to stream any live video stream in fairly decent quality. I imagine what is holding them back if the agreements with the content providers (channels) like Discovery, MTV, NBC Universal, etc. If the old don&#8217;t get on board soon, they will be in 5-10 years where the newspaper industry is now.</p>
<p>I am looking forward to what the Google TV platform is going to offer. A bonus would be if you could run it on additional hardware other than hardware offered by Sony or other companies. Since it is open source, this is a distinct possibility and we could see a lot come from this, even if the hardware itself proves unsuccessful. There is one thing Google has a lot of &#8212; vision &#8212; and it would be great to see that on your television.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=M4PJ3Fgb5II:wKoeKaKJ2NI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=M4PJ3Fgb5II:wKoeKaKJ2NI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=M4PJ3Fgb5II:wKoeKaKJ2NI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=M4PJ3Fgb5II:wKoeKaKJ2NI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=M4PJ3Fgb5II:wKoeKaKJ2NI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=M4PJ3Fgb5II:wKoeKaKJ2NI:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=M4PJ3Fgb5II:wKoeKaKJ2NI:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=M4PJ3Fgb5II:wKoeKaKJ2NI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/M4PJ3Fgb5II" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/thoughts-on-the-google-tv-platform/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://systembash.com/content/thoughts-on-the-google-tv-platform/</feedburner:origLink></item>
		<item>
		<title>One Line Linux Command to Print Out Directory Tree Listing</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/kOK4ub-M34Y/</link>
		<comments>http://systembash.com/content/one-line-linux-command-to-print-out-directory-tree-listing/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 21:41:55 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=650</guid>
		<description><![CDATA[My professor sent us this little one liner (ok, I had to format it to 2 lines to fit in this blog. You know what I mean) which prints out the current directory tree: ls -R &#124; grep ":$" &#124; sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' \ -e 's/^/ /' -e 's/-/&#124;/' What&#8217;s going on here? [...]]]></description>
			<content:encoded><![CDATA[<p>My professor sent us this little one liner (ok, I had to format it to 2 lines to fit in this blog. You know what I mean) which prints out the current directory tree:</p>
<pre>ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' \
-e 's/^/ /' -e 's/-/|/'</pre>
<p>What&#8217;s going on here?<br />
<span id="more-650"></span></p>
<ul>
<li><code>ls -R</code> &#8212; list files and directories recursively</li>
<li><code>grep ":$"</code> &#8212; find lines with : at the end (so only the directories)</li>
<li><code>sed -e</code> &#8212;  evaluate expressions on the lines</li>
<li><code>s/:$//</code> &#8212; remove &#8216;:&#8217; at the end of the line</li>
<li><code>s/[^-][^\/]*\//--/g</code> &#8212; replaces text between / / lines (parent directories) with &#8212; , globally on each line</li>
<li><code>s/^/ /</code> &#8212; add space at the beginning of the lines</li>
<li><code>s/-/|/</code> &#8212; replace first &#8211; of the line with |</li>
</ul>
<p>I reduced this using the following command. The most notable difference is that I use find instead of ls, which results in also viewing .hidden directories. I&#8217;m not sure which command is faster.</p>
<pre>find ./ -type d | sed -e 's/[^-][^\/]*\//--/g;s/--/ |-/'</pre>
<p>Both commands result in a formatted directory listing, demonstrated below:</p>
<pre>|-sitetransfer
 |---redacteddomain.com
 |-----cache
 |-----templates
 |-------skidoo_too
 |---------images
 |-----------_vti_cnf
 |---------css
 |-----------_vti_cnf
 |---------js
 |-----------scriptaculous
 |-------------src
 |-------------lib
 |---------admin_templates</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=kOK4ub-M34Y:8gurhcNOL3k:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=kOK4ub-M34Y:8gurhcNOL3k:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kOK4ub-M34Y:8gurhcNOL3k:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=kOK4ub-M34Y:8gurhcNOL3k:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kOK4ub-M34Y:8gurhcNOL3k:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kOK4ub-M34Y:8gurhcNOL3k:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=kOK4ub-M34Y:8gurhcNOL3k:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=kOK4ub-M34Y:8gurhcNOL3k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/kOK4ub-M34Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/one-line-linux-command-to-print-out-directory-tree-listing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://systembash.com/content/one-line-linux-command-to-print-out-directory-tree-listing/</feedburner:origLink></item>
		<item>
		<title>HBO GO Online Streaming Video Review and Screenshots</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/n3546TEMrq8/</link>
		<comments>http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 02:55:35 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Television]]></category>
		<category><![CDATA[newmedia]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=625</guid>
		<description><![CDATA[HBO GO has been in the works for a while now, and is an indication of what some networks are trying to do to add value to their subscription rate. Offering video for streaming online is definitely a benefit to a premium channel like HBO. And it is a glimpse as to what the future [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hbogo.com">HBO GO</a> has been in the works for a while now, and is an indication of what some networks are trying to do to add value to their subscription rate. Offering video for streaming online is definitely a benefit to a premium channel like HBO. And it is a glimpse as to what the future of online video will hold.</p>
<p><img class="aligncenter size-full wp-image-628" title="HBO GO" src="http://systembash.com/wp-content/uploads/2010/02/hbo-go.png" alt="" width="500" height="300" /></p>
<p>I recently got rid of my cable box and implemented a <a href="http://systembash.com/content/replacing-the-cable-box-boxee-and-live-hd-tv-via-acer-revo-3610/">do-it-yourself solution</a>. Since HBO is a premium channel and encrypted, they force you to either buy a cable box via subscription or also a cable-card (which they also charge for). This actually gives me a unique perspective on the service: would I pay for HBO to receive the HBO GO online only offering?<span id="more-625"></span></p>
<p>Starting with the online interface, I was actually very impressed with it. It is done entirely in flash and is simple to use. To receive access to HBO GO at this point, you must be a <a href="http://www.verizon.com/fiostv">Verizon FiOS TV</a> subscriber and also be signed up to receive HBO. HBO will eventually be offering this to other cable providers in the future as part of the <a href="http://www.tvanywhere.org/">TV Anywhere</a> initiative. Once you log in you are presented with an image-rich user interface. You filter by TV show, movies and categories and everything was very intuitive. Information is available on shows and movies, including any extra available content. There is a &#8216;watchlist&#8217; where you can add your content into a queue which will play through automatically.</p>
<p><img class="size-full wp-image-627 alignleft" title="HBO GO Watchlist" src="http://systembash.com/wp-content/uploads/2010/02/hbogo-watchlist.png" alt="" width="321" height="271" /></p>
<p>By default, video will play in &#8220;SD&#8221; or Standard Definition. The quality is what you would expect, some graininess and compression is visible. However, there is a small switch named &#8220;Watch in HD&#8221;. <strong>The video looks simply spectacular in HD</strong>. If I had to guess I would say that it is in 720p resolution, which isn&#8217;t too bad for streaming video which has a very small buffer time.</p>
<p>The main drawback I saw was that the selection isn&#8217;t great, but it does give you a sample of the premium content available on HBO. It does offer HBO-only shows such as True Blood, The Sopranos, The Wire and a few more. Each category holds a dozen or so shows, and not the entire HBO library. However next to Netflix the movie selection is extremely sparse. As the service stands, I would not see it being valuable as a movie-streaming service. HBO really needs to up the ante and offer the majority of their content on their website if subscribers are paying for it. Curb Your Enthusiasm is a notable missing series.</p>
<p><a href="http://labs.adobe.com/technologies/flashplayer10/"><img class="alignright size-full wp-image-629" title="Adobe Labs" src="http://systembash.com/wp-content/uploads/2010/02/adobelabs.png" alt="" width="206" height="129" /></a>Another technical detail I wish to touch on is how they chose to use Adobe Flash for the technology for streaming video. I have a somewhat older CPU and Machine (Athlon X2 4200 CPU) and on Adobe 10.0 I did see some significant frame dropping, especially in HD mode. Having learned about Flash 10.1 beta coming out of <a href="http://labs.adobe.com/technologies/flashplayer10/">Adobe Labs</a>, and knowing that it is optimized to use your GPU to play flash video, I tried upgrading and it significantly improved the video performance. Windowed performance was a little shaky but Full-Screen framerate was great. If you are running an older system, <a href="http://labs.adobe.com/downloads/flashplayer10.html">consider upgrading to the latest Flash versions</a> for the best video performance.</p>
<p>There has been some talk about HBO possibly offering the HBO GO site to non-cable subscribers for a monthly fee. If they are going to be successful at offering an online-only offering, they will need to offer ALL, or at least a majority, of their shows and a larger movie library which equals their cable offerings. Without that, they are offering a restricted service which is basically just placating the growing demand for on-demand video from content providers and not setting the proper tone as a premium content provider.</p>
<p>The images below are screenshots from the service, to give you an idea as to how beautiful the interface is:</p>

<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo1/' title='HBO Go Homescreen '><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo1-150x150.png" class="attachment-thumbnail" alt="The HBO GO Home Screen" title="HBO Go Homescreen" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo2/' title='HBO Go Video'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo2-150x150.png" class="attachment-thumbnail" alt="Video Playback Windowed" title="HBO Go Video" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo3/' title='HBO Go UI'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo3-150x150.png" class="attachment-thumbnail" alt="UI For HBO Go Windowed" title="HBO Go UI" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo4/' title='HBO Go Playback'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo4-150x150.png" class="attachment-thumbnail" alt="Playback" title="HBO Go Playback" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo5/' title='Movie Information'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo5-150x150.png" class="attachment-thumbnail" alt="HBO Go Movie Information" title="Movie Information" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo6/' title='Movie Menu'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo6-150x150.png" class="attachment-thumbnail" alt="Movie Menu" title="Movie Menu" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo7/' title='HBO Go Fullscreen'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo7-150x150.png" class="attachment-thumbnail" alt="HBO Go Fullscreen HD Video Screenshot" title="HBO Go Fullscreen" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo8/' title='HBO Go Shows'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo8-150x150.png" class="attachment-thumbnail" alt="HBO Go Show List" title="HBO Go Shows" /></a>
<a href='http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/hbogo9/' title='HBO Go Menu'><img width="150" height="150" src="http://systembash.com/wp-content/uploads/2010/02/hbogo9-150x150.png" class="attachment-thumbnail" alt="HBO Go Menu" title="HBO Go Menu" /></a>

<p>In summary, the HBO GO online on-demand video streaming service from HBO is a delight to use and the quality and performance is spectacular. However, the lack of content is obvious and if they wish to really attract subscribers they are going to have to offer much more. Otherwise it is just one of those extra services that might gain a few followers but isn&#8217;t going to drive users to the service in droves. I applaud HBO for dipping their toes into the online video streaming world &#8211; now they need to embrace it and lead us into the future of premium video content online.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=n3546TEMrq8:tTXHxfmx54E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=n3546TEMrq8:tTXHxfmx54E:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=n3546TEMrq8:tTXHxfmx54E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=n3546TEMrq8:tTXHxfmx54E:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=n3546TEMrq8:tTXHxfmx54E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=n3546TEMrq8:tTXHxfmx54E:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=n3546TEMrq8:tTXHxfmx54E:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=n3546TEMrq8:tTXHxfmx54E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/n3546TEMrq8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://systembash.com/content/hbo-go-online-streaming-video-review-and-screenshots/</feedburner:origLink></item>
		<item>
		<title>One Line Batch Rename Files Using CSV Input File and awk</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/szQeENod77k/</link>
		<comments>http://systembash.com/content/one-line-batch-rename-files-using-csv-input-file-and-awk/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 17:12:32 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[csv]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=614</guid>
		<description><![CDATA[The Bash command environment, which is the namesake of this blog, is very flexible in that it allows you to manipulate the filesystem in many ways. Awk and sed are very powerful tools that allow you to do this rename with a simple one line command. This post will walk you through doing this with [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.gnu.org/software/bash/manual/bashref.html#What-is-Bash_003f">Bash</a> command environment, which is the namesake of this blog, is very flexible in that it allows you to manipulate the filesystem in many ways. <a href="http://linux.die.net/man/1/awk">Awk</a> and <a href="http://linux.die.net/man/1/sed">sed</a> are very powerful tools that allow you to do this rename with a simple one line command. This post will walk you through doing this with a Comma Separated Value (CSV) file and also using a simple regular expression to rename many files.<br />
<span id="more-614"></span><br />
The goal is  to rename a whole folder, hundreds of files, to a <a href="http://forum.boxee.tv/showthread.php?t=5214">proper format</a> for viewing in Boxee. The old listing, for example using ls -1, was:</p>
<pre>Seinfeld-(The Wig Master)-2003-09-26-0(1).avi
Seinfeld-(The Wink)-2004-01-03-0.avi
Seinfeld-(The Wizard)-2004-02-26-0.avi
Seinfeld-(The Yada Yada)-2003-06-04-0.avi
Seinfeld-(The Pen)-2004-06-22-0.avi</pre>
<p>I created a CSV file, and from the powers of the <a href="https://www.mturk.com/mturk/welcome">Amazon Mechanical Turk</a> services, generated an entire list of the correct filenames, in the format:</p>
<pre>Seinfeld.7x19.The.Wig.Master.avi
Seinfeld.7x04.The.Wink.avi
Seinfeld.9x15.The.Wizard.avi
Seinfeld.8x19.The.Yada.Yada.avi
Seinfeld.3x03.The.Pen.avi</pre>
<p>Now I just needed a way to actually do the rename.</p>
<p>The final CSV file I generated is in the format:</p>
<pre>Seinfeld-(The Wig Master)-2003-09-26-0(1).avi,Seinfeld.7x19.The.Wig.Master.avi
Seinfeld-(The Wink)-2004-01-03-0.avi,Seinfeld.7x04.The.Wink.avi
Seinfeld-(The Wizard)-2004-02-26-0.avi,Seinfeld.9x15.The.Wizard.avi
Seinfeld-(The Yada Yada)-2003-06-04-0.avi,Seinfeld.8x19.The.Yada.Yada.avi
Seinfeld-(The Pen)-2004-06-22-0.avi,Seinfeld.3x03.The.Pen.avi</pre>
<p>Note that in my format, there could be no commas in the file names; but you can use any other delimiter such as = or ;, it would work equally as well with a character change in the script.</p>
<p>Using awk, you can get a correct command line output from this file:</p>
<pre>awk -F',' '{print("mv &#92;"" $1 "&#92;" &#92;"" $2 "&#92;"")}' input.txt</pre>
<p>Results in a preview of your commands, like so:</p>
<pre>mv "Seinfeld-(The Wig Master)-2003-09-26-0(1).avi" "Seinfeld.7x19.The.Wig.Master.avi"
mv "Seinfeld-(The Wink)-2004-01-03-0.avi" "Seinfeld.7x04.The.Wink.avi"
mv "Seinfeld-(The Wizard)-2004-02-26-0.avi" "Seinfeld.9x15.The.Wizard.avi"
mv "Seinfeld-(The Yada Yada)-2003-06-04-0.avi" "Seinfeld.8x19.The.Yada.Yada.avi"
mv "Seinfeld-(The Pen)-2004-06-22-0.avi" "Seinfeld.3x03.The.Pen.avi"</pre>
<p>Note that we put the file names in quotes because they contain spaces, and linux won&#8217;t recognize the filenames if you don&#8217;t include that. The -F command in awk is where you specify your delimiter, so feel free to use another character. Once you have &#8216;proofed&#8217; the script to make sure it is doing what you expect it to, you execute it by adding |/bin/sh to the end, to pipe it directly to bash.</p>
<pre>awk -F',' '{print("mv &#92;"" $1 "&#92;" &#92;"" $2 "&#92;"")}' input.txt | /bin/sh</pre>
<p>This won&#8217;t result in any output, but you will see that it changed the names of your files, just as if you would have typed in the commands (proofed above) yourself.</p>
<p>If you don&#8217;t want to go through the bother of generating a CSV file, but you still want to use bash to rename files using awk, you can use a similar command which I found over at <a href="http://snipplr.com/view/3648/batch-file-rename-with-awk-and-sed/">Snipplr</a>.</p>
<pre>ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2'</pre>
<p>As with the other one, this will output the command to move the file but instead uses sed to do a search/replace of the string in the filename. Append |/bin/sh to execute the commands on your system.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=szQeENod77k:BeLx5Dj5qzU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=szQeENod77k:BeLx5Dj5qzU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=szQeENod77k:BeLx5Dj5qzU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=szQeENod77k:BeLx5Dj5qzU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=szQeENod77k:BeLx5Dj5qzU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=szQeENod77k:BeLx5Dj5qzU:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=szQeENod77k:BeLx5Dj5qzU:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=szQeENod77k:BeLx5Dj5qzU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/szQeENod77k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/one-line-batch-rename-files-using-csv-input-file-and-awk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://systembash.com/content/one-line-batch-rename-files-using-csv-input-file-and-awk/</feedburner:origLink></item>
		<item>
		<title>UbunTOS – Ubuntu 9.10 + TinyOS 2.x VirtualBox Image</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/AQ9-qKJEWwc/</link>
		<comments>http://systembash.com/content/ubuntos-ubuntu-9-10-tinyos-2-x-virtualbox-image/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 01:05:56 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Programs]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[tinyos]]></category>
		<category><![CDATA[ubuntos]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=601</guid>
		<description><![CDATA[This is my admittedly minor but I hope useful contribution to the TinyOS development community. TinyOS is an Operating System and development framework for Wireless Sensor Networks and other platforms which has a small footprint and is very energy conscious. The TinyOS source code is available for free online for many operating systems, however it takes [...]]]></description>
			<content:encoded><![CDATA[<p>This is my admittedly minor but I hope useful contribution to the TinyOS development community. <a href="http://tinyos.net/">TinyOS</a> is an Operating System and development framework for Wireless Sensor Networks and other platforms which has a small footprint and is very energy conscious.</p>
<p>The TinyOS source code is available for free online for many operating systems, however it takes a long time to get the environment set up and it is not portable at all. I came across <a href="http://toilers.mines.edu/Public/XubunTOS">XubunTOS</a> but it did not seem to be in active development anymore, so I endeavored to install TinyOS 2.1 and 2.x from source into a regular Ubuntu image. The most help came from <a href="http://www.keally.org/2008/11/11/installing-tinyos-2x-on-ubuntu-with-iris-support/">Matt Keally&#8217;s Blog</a>. While doing this, I thought it might be useful to many others who wish to develop in the TinyOS framework but might not have the skills necessary to install it. Therefore, I developed this <a href="http://www.virtualbox.org/">VirtualBox</a> image so that you can install it on any system for which VirtualBox is available and supports USB passthrough for the programming of the motes. I&#8217;ve tested on Windows 7, Windows XP and it should work on any other host OS, but I would love to hear your feedback. All <a href="http://www.arsgeek.com/2007/05/10/exclusive-canonical-ltd-and-ubuntu-founder-mark-shuttleworth-announce-ubuntos/">funny business</a> aside, I present to the world UbunTOS:<span id="more-601"></span></p>
<p><a href="http://systembash.com/wp-content/uploads/2010/02/vboxubuntos.png"><img class="aligncenter size-full wp-image-605" title="vboxubuntos" src="http://systembash.com/wp-content/uploads/2010/02/vboxubuntos.png" alt="" width="453" height="230" /></a></p>
<h3>Features</h3>
<ul>
<li>Ubuntu 9.10 OS (patched through 2/5/2010)</li>
<li>Complete TinyOS development environment</li>
<li>TinyOS 2.1 Installed</li>
<li>TinyOS 2.x CVS Installed (default environment)</li>
<li>Portable for development in a variety of host environments</li>
<li>Patched motelist for MIB520 programming board</li>
</ul>
<h3>Directions</h3>
<ol>
<li>Unzip the file and import into VirtualBox. I recommend at least 768M RAM</li>
<li>Boot system</li>
<li>Enable USB passthrough for the programming board. Check off the USB device in the menu as shown:<br />
<img class="aligncenter size-full wp-image-606" title="vboxusb" src="http://systembash.com/wp-content/uploads/2010/02/vboxusb.png" alt="VirtualBox USB Passthrough" width="381" height="132" /></li>
<li>Check &#8216;motelist&#8217; to see which port it has been assigned to (motelist has been patched to see MIB520 programming board)</li>
<li>Program away! TinyOS resides in /opt/</li>
</ol>
<h3><span style="text-decoration: underline;">Download</span></h3>
<p>MD5 sum:    <strong>9a27ba7902337139c2eae0121ec6ca4e</strong></p>
<p>Download UbuntuTOS_Ubuntu-9.10_TinyOS-2.x.zip [2/8/2010]:    [ <a href="/devel/UbuntuTOS_Ubuntu-9.10_TinyOS-2.x.zip.torrent"><strong>torrent</strong></a> | <a href="http://static.systembash.com/UbuntuTOS_Ubuntu-9.10_TinyOS-2.x.zip"><strong>http</strong></a> ]</p>
<p>If you happen to have spare bandwidth, please <a href="http://systembash.com/contact/">send me a note</a> and I will link to the file via http or ftp.</p>
<h3>Notes</h3>
<ul>
<li>The default username is wcu and password is <strong>nosecurity</strong></li>
<li>The hostname is wcu-desktop, in honor of <a href="http://www.wcupa.edu">West Chester University</a> which is sponsoring my research into Wireless Sensor Networks.</li>
<li>To switch between the TinyOS 2.x and 2.1 environment, run the shell script /opt/tinyos-2.1.0/tinyos.sh or /opt/tinyos-2.x/tinyos-2.x.sh. By default the 2.x environment is loaded via ~/.bashrc/.</li>
<li>To update TinyOS 2.x with latest CVS Code:<br />
cd /opt; cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x</li>
<li>I&#8217;ve testing this using <em>Mica2 </em>and<em> Micaz</em>. Let me know if you have success with other combinations as I just do not have the hardware to test.</li>
<li>Usually the programming port and the data port are on consecutive ports. In the example above, the programming device is /dev/ttyUSB0 and the data port, for serialforwarder, is /dev/ttyUSB1</li>
</ul>
<h3>Known Bugs?</h3>
<p>If you have issues while enabling USB Passthrough, such as an error like:</p>
<p>Version:1.0 StartHTML:0000000105 EndHTML:0000001970 StartFragment:0000000127 EndFragment:0000001952</p>
<p><!--StartFragment--></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="#eeeeee">
<tbody>
<tr>
<td>Result Code:</td>
<td>E_INVALIDARG (0&#215;80070057)</td>
</tr>
<tr>
<td>Component:</td>
<td>HostUSBDevice</td>
</tr>
<tr>
<td>Interface:</td>
<td>IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a}</td>
</tr>
<tr>
<td>Callee:</td>
<td>IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}</td>
</tr>
</tbody>
</table>
<p>Reboot your host system. I believe this happens while reinstalling the passthrough driver for the USB device for the first time. Rebooting seems to fix this problem, and after the initial setup this problem seems to disappear.</p>
<p>If you have any other problems (or compliments!) please leave a message via the form below.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=AQ9-qKJEWwc:5YbPVKGM6Y8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=AQ9-qKJEWwc:5YbPVKGM6Y8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=AQ9-qKJEWwc:5YbPVKGM6Y8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=AQ9-qKJEWwc:5YbPVKGM6Y8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=AQ9-qKJEWwc:5YbPVKGM6Y8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=AQ9-qKJEWwc:5YbPVKGM6Y8:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=AQ9-qKJEWwc:5YbPVKGM6Y8:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=AQ9-qKJEWwc:5YbPVKGM6Y8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/AQ9-qKJEWwc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/ubuntos-ubuntu-9-10-tinyos-2-x-virtualbox-image/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://systembash.com/content/ubuntos-ubuntu-9-10-tinyos-2-x-virtualbox-image/</feedburner:origLink></item>
		<item>
		<title>Essential FourSquare Anti-Stalking Security Tips</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/RzFKfHwyAeA/</link>
		<comments>http://systembash.com/content/essential-foursquare-security-anti-stalking-guide-tip/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 00:03:52 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[society]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=587</guid>
		<description><![CDATA[Currently I am in the Computer Science Master's Program at West Chester University and I am focusing my research on Location Based Updates in Social Media and their societal and security implications. So you can say I think about this topic more than most normal people do.

<a href="http://foursquare.com/">FourSquare</a> is a growing service that allows you to "Check in" to restaurants, grocery stores, museums and just about any place you can imagine. However, I have seen several of my friends checking in to locations which, I must say as a security research student, set off warning bells. Although I am calling out FourSquare specifically, these also apply to just about any other location based software where you broadcast your location to other folks, whether they are your friends or the general public. <a href="http://gowalla.com/">GoWalla</a> and <a href="http://brightkite.com/">BrightKite</a> are in the same boat.

Without further ado... here is my list of top FourSquare Security Faux Pas (after the break...)]]></description>
			<content:encoded><![CDATA[<p>Currently I am in the Computer Science Master&#8217;s Program at West Chester University and I am focusing my research on Location Based Updates in Social Media and their societal and security implications. So you can say I think about this topic more than most normal people do.</p>
<p><a href="http://foursquare.com/">FourSquare</a> is a growing service that allows you to &#8220;Check in&#8221; to restaurants, grocery stores, museums and just about any place you can imagine. However, I have seen several of my friends checking in to locations which, I must say as a security research student, set off warning bells. Although I am calling out FourSquare specifically, these also apply to just about any other location based software where you broadcast your location to other folks, whether they are your friends or the general public. <a href="http://gowalla.com/">GoWalla</a> and <a href="http://brightkite.com/">BrightKite</a> are in the same boat.</p>
<p>As with any list, there are exceptions to the rule. So although I would say that you should generally avoid checking in at these locations and you can use it as a rough guide, things might be different for you personally.</p>
<p>Without further ado&#8230; here is my list of <strong>top FourSquare Check-in Locations To Avoid</strong><span id="more-587"></span>:</p>
<h2>1. Checking In At Home</h2>
<p>This one would seem to be obvious a few years ago. Remember the &#8220;old rules&#8221; when you got on the internet &#8211; don&#8217;t give anyone your real name, address, phone number or other personally identifiable information? It seems like this one went out the door when social media came into the picture. I&#8217;ve seen many folks posting the exact coordinates of their home, as well as when they are home. Between that and the fact that many users have their real names associated with their user ids, this becomes a huge security problem. Stalkers would love to get their hands on this information.</p>
<h2>2. Checking In At Your Significant Other&#8217;s Home</h2>
<p>Similarly to checking in at home, does someone need to know the location of your boyfriend&#8217;s, girlfriend&#8217;s or fiance&#8217;s residence? This information should be public knowledge.</p>
<h2>
<div id="attachment_594" class="wp-caption alignright" style="width: 210px"><a href="http://www.flickr.com/photos/epicharmus/756868390/"><img class="size-full wp-image-594" title="bank" src="http://systembash.com/wp-content/uploads/2010/02/bank.png" alt="" width="200" height="133" /></a><p class="wp-caption-text">Photo by epicharmus</p></div>
<p>3. Checking In At Your Bank</h2>
<p>One thing you should never, ever let scammers, con artists, and identity thieves know is where you do your banking. Checking in even once at this location gives them not only an idea of the company where you bank at, but which branch you go to and the time of day you typically visit. This should definitely be a no-no. It&#8217;s like wearing an &#8220;I&#8217;m carrying cash&#8221; sign on your back.</p>
<h2>4. Checking In While On Vacation</h2>
<p>&#8220;I&#8217;m in Florida for the next 7 days with my whole family&#8221; is just begging for a burglar to come ransack your house. Maybe you have someone house sitting for you, or have some sort of security system in place, but I suspect many do not.</p>
<p>This is a tough one to follow. When you are on vacation in some interesting place, you want to tell your friends about it. What I tend to do is to check in, but not mention that my family is with me. This obfuscates some of the information and would hopefully give enough doubt to any would-be intruders to actually trying to break into your home.</p>
<h2>5. Checking In At Your Doctor&#8217;s Office</h2>
<p>In addition to calls of &#8220;TMI&#8221; this is another one that you should keep to yourself for privacy purposes. Someone could in theory call or visit your doctor&#8217;s office and get your personal medical information.</p>
<h2>
<div id="attachment_595" class="wp-caption alignleft" style="width: 138px"><a href="http://www.flickr.com/photos/tidewatermuse/165345815/"><img class="size-full wp-image-595" title="security" src="http://systembash.com/wp-content/uploads/2010/02/security.png" alt="" width="128" height="200" /></a><p class="wp-caption-text">Photo courtesy of tidewatermuse</p></div>
<p>6. Checking In At Work, Depending on Your Job</h2>
<p>This one depends highly on your job. If you are a security guard, you probably don&#8217;t want anyone knowing when you are on or off the job. However if you are a desk worker, you won&#8217;t mind if your friends, or anyone knows that you are indeed at work as this can be assumed.  If you are in the military and are deployed on a secret assignment in a foreign city, don&#8217;t think it is proper to check in anywhere in that city. (In fact, you might want to check in at a false location for misdirection, but that topic is for another day.)</p>
<p>Alternatively, if you are supposed to be at work but have called in sick, don&#8217;t check in at your favorite bar that night. It will reveal your ruse in an instant to anyone who is in-the-know enough to follow you on 4square.</p>
<h2>7. Checking in at Your Child&#8217;s School</h2>
<p>This is an addition from a friend, he mentioned that he makes sure that he never checks in at his children&#8217;s school. You don&#8217;t want to give someone a direct map and time table for when your kid is at school. This is another check in place that should be strictly off limits.</p>
<p><strong>In conclusion,</strong> when checking into a location, be aware of what someone would do with that information if they had a malicious purposes. Maybe it is a bit paranoid, but I try to think of the above reasons before I check in at locations which could divulge sensitive information to unknown parties.</p>
<p>Sure you can restrict who you friend on these networks, but increasingly it has become obvious that criminals are using fake accounts to friend folks and &#8220;grow&#8221; their network. Be careful with who you friend and send all of your location information to. In addition to the above specific locations which can reveal sensitive information about you, any 4square user checking in at restaurants or other places divulge a pattern of travel that could be used against them.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=RzFKfHwyAeA:8I3YAsO---g:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=RzFKfHwyAeA:8I3YAsO---g:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=RzFKfHwyAeA:8I3YAsO---g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=RzFKfHwyAeA:8I3YAsO---g:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=RzFKfHwyAeA:8I3YAsO---g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=RzFKfHwyAeA:8I3YAsO---g:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=RzFKfHwyAeA:8I3YAsO---g:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=RzFKfHwyAeA:8I3YAsO---g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/RzFKfHwyAeA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/essential-foursquare-security-anti-stalking-guide-tip/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://systembash.com/content/essential-foursquare-security-anti-stalking-guide-tip/</feedburner:origLink></item>
		<item>
		<title>Linux Command Line, Generating a Random File</title>
		<link>http://feedproxy.google.com/~r/systembash/~3/_EQ28-Dl0ng/</link>
		<comments>http://systembash.com/content/linux-command-line-generating-a-random-file/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 01:53:41 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=581</guid>
		<description><![CDATA[It is very easy to create a random file using the linux command line. Much like the command to fill a file with all zeros, for example a 1 Meg file: dd if=/dev/zero of=zero.filename bs=1024 count=1000 You do the same using /dev/urandom: dd if=/dev/urandom of=random.filename bs=1024 count=1000 Resulting in a 1MB file: 1000+0 records in [...]]]></description>
			<content:encoded><![CDATA[<p>It is very easy to create a random file using the linux command line. Much like the command to fill a file with all zeros, for example a 1 Meg file:</p>
<pre>dd if=/dev/zero of=zero.filename bs=1024 count=1000</pre>
<p>You do the same using /dev/urandom:</p>
<pre>dd if=/dev/urandom of=random.filename bs=1024 count=1000</pre>
<p>Resulting in a 1MB file:</p>
<pre>1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.0294247 s, 34.8 MB/s</pre>
<p>This is transferring random data from the virtual device urandom to the output file. We use /dev/urandom instead of /dev/random because the /dev/random source generates random data very slowly. urandom is much faster at this but remains very random, <a href="http://vinitsworld.blogspot.com/2008/10/difference-between-devrandom-and.htmlh">if not quite a random</a> as /dev/random. This should work with any system with <a href="http://linux.die.net/man/1/dd">dd</a> and /dev/urandom.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/systembash?a=_EQ28-Dl0ng:4O83AlLI0IQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/systembash?i=_EQ28-Dl0ng:4O83AlLI0IQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_EQ28-Dl0ng:4O83AlLI0IQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/systembash?i=_EQ28-Dl0ng:4O83AlLI0IQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_EQ28-Dl0ng:4O83AlLI0IQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/systembash?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_EQ28-Dl0ng:4O83AlLI0IQ:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/systembash?i=_EQ28-Dl0ng:4O83AlLI0IQ:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/systembash?a=_EQ28-Dl0ng:4O83AlLI0IQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/systembash?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/systembash/~4/_EQ28-Dl0ng" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/linux-command-line-generating-a-random-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://systembash.com/content/linux-command-line-generating-a-random-file/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)
Database Caching 8/14 queries in 0.033 seconds using disk

Served from: systembash.com @ 2010-08-30 13:09:47 -->
