<?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>Web Development &#38; Stuff &#187; Shell</title>
	<atom:link href="http://web-development-blog.co.uk/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://web-development-blog.co.uk</link>
	<description>Some interesting findings from web-dev land...</description>
	<lastBuildDate>Mon, 02 Apr 2012 15:10:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Return exit code of previous shell command</title>
		<link>http://web-development-blog.co.uk/2009/10/03/return-exit-code-of-previous-shell-command/</link>
		<comments>http://web-development-blog.co.uk/2009/10/03/return-exit-code-of-previous-shell-command/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 14:45:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux servers]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Shell scripting]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/?p=196</guid>
		<description><![CDATA[You can return the exit/return code of the command you just ran in OSX/Linux using this simple command:
1echo $?
This is handy when debugging scripts that rely on shell command return values.
]]></description>
			<content:encoded><![CDATA[<p>You can return the exit/return code of the command you just ran in OSX/Linux using this simple command:</p>
<div class="codecolorer-container mysql " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="mysql codecolorer" style="font-family:Monaco,Lucida Console,monospace">echo $?</div></td></tr></tbody></table></div>
<p>This is handy when debugging scripts that rely on shell command return values.</p>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/10/03/return-exit-code-of-previous-shell-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reload bash_profile / profile without starting a new shell session</title>
		<link>http://web-development-blog.co.uk/2009/03/04/reload-bash_profile-profile-without-starting-a-new-shell-session/</link>
		<comments>http://web-development-blog.co.uk/2009/03/04/reload-bash_profile-profile-without-starting-a-new-shell-session/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 14:47:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux servers]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/?p=89</guid>
		<description><![CDATA[I always used to log-out / log-back-in to shell, to allow changes in my .bash_profile to kick in. I&#8217;m guessing this would work in OSX with your .profile file too but I&#8217;ve not tested it. Anyways, I discovered you can reload the script on the fly using:
1source ~/.bash_profile
]]></description>
			<content:encoded><![CDATA[<p>I always used to log-out / log-back-in to shell, to allow changes in my .bash_profile to kick in. I&#8217;m guessing this would work in OSX with your .profile file too but I&#8217;ve not tested it. Anyways, I discovered you can reload the script on the fly using:</p>
<div class="codecolorer-container sql " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="sql codecolorer" style="font-family:Monaco,Lucida Console,monospace">source ~<span class="sy0">/.</span>bash_profile</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/03/04/reload-bash_profile-profile-without-starting-a-new-shell-session/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mount remote file system on your local file system over SSH &#8211; SSHFS</title>
		<link>http://web-development-blog.co.uk/2009/02/25/mount-remote-file-system-on-your-local-file-system-ssh-sshfs/</link>
		<comments>http://web-development-blog.co.uk/2009/02/25/mount-remote-file-system-on-your-local-file-system-ssh-sshfs/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 23:07:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux servers]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/?p=80</guid>
		<description><![CDATA[Lots of love going about today! This time, the recipient is SSHFS which allows you to mount a remote filing system onto your local tree over SSH. In a virtual hosting environment (/vhosts/ etc) it&#8217;s pure joy to work with.
You&#8217;ll need to install SSHFS on the client (the machine you want to mount the remote [...]]]></description>
			<content:encoded><![CDATA[<p>Lots of love going about today! This time, the recipient is SSHFS which allows you to mount a remote filing system onto your local tree over SSH. In a virtual hosting environment (/vhosts/ etc) it&#8217;s pure joy to work with.</p>
<p>You&#8217;ll need to install SSHFS on the client (the machine you want to mount the remote system on). All you need on the remote system is SSH. This is already installed on most systems.</p>
<p>You can install SSHFS on OSX with Mac Ports:</p>
<div class="codecolorer-container sql " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="sql codecolorer" style="font-family:Monaco,Lucida Console,monospace">port install sshfs</div></td></tr></tbody></table></div>
<p>On the local client system add the user you&#8217;re going to connect with to the fuse group. That group was created when you installed SSHFS:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">gpasswd -a localuser fuse</div></td></tr></tbody></table></div>
<p>Create a directory on the local filing system to use as a mount point:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">mkdir /vhosts_servername/</div></td></tr></tbody></table></div>
<p>Now connect to the remote system using a command line like this on the client:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">sshfs localuser@yourdomain.com:/remote_directory/ /vhosts_servername</div></td></tr></tbody></table></div>
<p>Nice ;]</p>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/02/25/mount-remote-file-system-on-your-local-file-system-ssh-sshfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL export SQL query as file</title>
		<link>http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/</link>
		<comments>http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 10:35:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux servers]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/</guid>
		<description><![CDATA[This will dump an SQL statement into a file:
1mysql -u username -p database_name -e &#34;SQL_STATEMENT&#34; &#38;gt; file.data
]]></description>
			<content:encoded><![CDATA[<p>This will dump an SQL statement into a file:</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace">mysql -u username -p database_name -e &quot;SQL_STATEMENT&quot; <span class="sc1">&amp;gt;</span> file.data</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN ignore directory contents</title>
		<link>http://web-development-blog.co.uk/2009/01/17/svn-ignore-directory-contents/</link>
		<comments>http://web-development-blog.co.uk/2009/01/17/svn-ignore-directory-contents/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 10:40:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux servers]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Versioning]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/2009/01/17/svn-ignore-directory-contents/</guid>
		<description><![CDATA[If you want to ignore (skip) files inside a directory with SVN:
1svn pe svn:ignore smarty/templates_c
This will prompt you for a pattern (*.php) via your editor of choice. So you&#8217;ll need the EDITOR environment variable set in your ~bash.rc / .profile etc
1EDITOR=vi;  export EDITOR
Update (14/04/09): This only ignores files that are not already version controlled (inside [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to ignore (skip) files inside a directory with SVN:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">svn pe svn:ignore smarty/templates_c</div></td></tr></tbody></table></div>
<p>This will prompt you for a pattern (*.php) via your editor of choice. So you&#8217;ll need the EDITOR environment variable set in your ~bash.rc / .profile etc</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">EDITOR=vi;  export EDITOR</div></td></tr></tbody></table></div>
<p>Update (14/04/09): This only ignores files that are not already version controlled (inside SVN). So if you&#8217;re trying to ignore a directory that is already populated with version controlled files, you must svn delete them and re-populate the directory with non-version controlled copies. So make sure you back them up before the svn delete!</p>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/01/17/svn-ignore-directory-contents/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

