<?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>SurlyJake &#187; shell scripting</title>
	<atom:link href="http://www.surlyjake.com/category/linux/shell-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.surlyjake.com</link>
	<description></description>
	<lastBuildDate>Tue, 29 Jun 2010 21:27:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Script to run handbrake on an entire folder</title>
		<link>http://www.surlyjake.com/linux/script-to-run-handbrake-on-an-entire-folder/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=script-to-run-handbrake-on-an-entire-folder</link>
		<comments>http://www.surlyjake.com/linux/script-to-run-handbrake-on-an-entire-folder/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 21:33:09 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[bash script]]></category>
		<category><![CDATA[Handbrake]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[video files]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=601</guid>
		<description><![CDATA[Handbrake is a fantastic tool for (among other uses), converting videos into mobile formats. It is extremely easy to use and can usually get a video properly converted in just a few clicks. To get Videos encoded for use on my phone, I use the &#8220;iPhone &#38; iPod Touch&#8221; preset. It will convert your video [...]]]></description>
			<content:encoded><![CDATA[<p>Handbrake is a fantastic tool for (among other uses), converting videos into mobile formats. It is extremely easy to use and can usually get a video properly converted in just a few clicks. To get Videos encoded for use on my phone, I use the &#8220;iPhone &amp; iPod Touch&#8221; preset. It will convert your video to .mp4 as well as scall it down to a consumable size. This format will work on any smartphone I&#8217;ve seen.</p>
<p>My issue is that when converting a folder full of videos, I don&#8217;t want to have to use the gui to add a bunch of videos to the queue one by one. It&#8217;s a very clicky process. This simple bash script will walk handbrake through all the files in a selected folder:</p>
<pre><code>#!/bin/bash
for file in "$1"/*
do
	echo 'HandBrakeCLI -i "${file}" -o "${file}.mp4" --preset="iPhone &amp; iPod Touch"""'
	HandBrakeCLI -i "${file}" -o "${file}.mp4" --preset="iPhone &amp; iPod Touch"""
done</code></pre>
<p>Save that into a .sh file like &#8220;handbrakefolder.sh&#8221;</p>
<p>Now you can simply execute this script against a folder containing your video files. like this:</p>
<pre><code>hostname% ls Videos
Video1.avi
Video2.avi
Video3.avi
hostname% ./handbrakefolder.sh Videos
...
...
...
hostname% ls Videos
Video1.avi
Video1.avi.mp4
Video2.avi
Video2.avi.mp4
Video3.avi
Video3.avi.mp4</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/linux/script-to-run-handbrake-on-an-entire-folder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>script to update wordpress</title>
		<link>http://www.surlyjake.com/linux/shell-scripting/script-to-update-wordpress/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=script-to-update-wordpress</link>
		<comments>http://www.surlyjake.com/linux/shell-scripting/script-to-update-wordpress/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 21:02:37 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=119</guid>
		<description><![CDATA[Why? Because i&#8217;m lazy. I&#8217;ll update this to see if it works #!/bin/sh #your current site will be backed up to your home folder with the date in the name #change this to whatever you want BACKUPNAME="wordpress_site_b4_update" BACKUPDATE=`date +%y%m%d` #this is the path to your wordpress site's root SITEROOT="/usr/local/www/" #here she goez... cd ~ tar [...]]]></description>
			<content:encoded><![CDATA[<p>Why? Because i&#8217;m lazy. I&#8217;ll update this to see if it works<br />
<code>#!/bin/sh<br />
#your current site will be backed up to your home folder with the date in the name<br />
#change this to whatever you want<br />
BACKUPNAME="wordpress_site_b4_update"<br />
BACKUPDATE=`date +%y%m%d`<br />
#this is the path to your wordpress site's root<br />
SITEROOT="/usr/local/www/"<br />
#here she goez...<br />
cd ~<br />
tar -pczf "$BACKUPNAME""$BACKUPDATE".tar.gz "$SITEROOT"<br />
cd /usr/local<br />
fetch http://wordpress.org/latest.tar.gz<br />
tar -xzf latest.tar.gz<br />
rm latest.tar.gz<br />
cp -R wordpress/* "$SITEROOT"/<br />
rm -R wordpress<br />
chown -R www "$SITEROOT"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/linux/shell-scripting/script-to-update-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->