<?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>SJ Cuthbertson &#187; bash</title>
	<atom:link href="http://www.sjcuthbertson.me.uk/wp/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sjcuthbertson.me.uk</link>
	<description>A space for the mind to wander at will</description>
	<lastBuildDate>Sun, 04 Jul 2010 12:49:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Handy bash script</title>
		<link>http://www.sjcuthbertson.me.uk/wp/2008/05/handy-bash-script/</link>
		<comments>http://www.sjcuthbertson.me.uk/wp/2008/05/handy-bash-script/#comments</comments>
		<pubDate>Sun, 18 May 2008 12:55:35 +0000</pubDate>
		<dc:creator>Stuart</dc:creator>
				<category><![CDATA[happenings]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.sjcuthbertson.me.uk/?p=125</guid>
		<description><![CDATA[You&#8217;ve installed something from package repositories, and, on invoking, it tells you to actually run a certain script first. The script fails because you&#8217;re behind a proxy server, but you don&#8217;t know where Aptitude put the script in order to edit it. You know it&#8217;s in your $PATH, but that&#8217;s a lot of directories&#8230; Solution [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve installed something from package repositories, and, on invoking, it tells you to actually run a certain script first.  The script fails because you&#8217;re behind a proxy server, but you don&#8217;t know where Aptitude put the script in order to edit it.  You know it&#8217;s in your $PATH, but that&#8217;s a lot of directories&#8230;</p>
<p>Solution (assuming you use bash):<br />
<code><br />
for inMyPath in `echo $PATH | sed -e 's/:/\\t/g'`;<br />
do<br />
   find $inMyPath -name MISSING_FILE;<br />
done<br />
</code></p>
<p>MISSING_FILE is the name of the script (or whatever) that you&#8217;re after.  This is fairly trivial, I admit, but it took me a while to work out how to do it right (mainly sedding PATH correctly).  I&#8217;m about to put it into a script of its own for future use. <img src='http://www.sjcuthbertson.me.uk/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sjcuthbertson.me.uk/wp/2008/05/handy-bash-script/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
