<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>gd.sh改良しました。 へのコメント</title>
	<atom:link href="http://weblog.linux-domain.net/2007/12/27/49.html/feed" rel="self" type="application/rss+xml" />
	<link>http://weblog.linux-domain.net/2007/12/27/49.html</link>
	<description>IT業界のことや商品を紹介していきます！</description>
	<lastBuildDate>Thu, 31 Jan 2008 12:52:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>管理人 より</title>
		<link>http://weblog.linux-domain.net/2007/12/27/49.html/comment-page-1#comment-24</link>
		<dc:creator>管理人</dc:creator>
		<pubDate>Thu, 31 Jan 2008 12:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://linux-domain.net/weblog/2007/12/27/gdsh%e6%94%b9%e8%89%af%e3%81%97%e3%81%be%e3%81%97%e3%81%9f%e3%80%82/#comment-24</guid>
		<description>&lt;p&gt;コメントありがとうございます。&lt;br /&gt;
最後のpwd表示は良いですね。参考にさせていただきます。&lt;br /&gt;
通常通りの&quot;cd&quot;や&quot;cd -&quot;の時の動作はマズイですね～なにかいい方法を&lt;br /&gt;
考えないと・・・また思いついたらまた書きますね。&lt;br /&gt;
やはり自分では気づかないところがわかるので、とても勉強になります。&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>コメントありがとうございます。<br />
最後のpwd表示は良いですね。参考にさせていただきます。<br />
通常通りの&#8221;cd&#8221;や&#8221;cd -&#8221;の時の動作はマズイですね～なにかいい方法を<br />
考えないと・・・また思いついたらまた書きますね。<br />
やはり自分では気づかないところがわかるので、とても勉強になります。</p>
]]></content:encoded>
	</item>
	<item>
		<title>rekkusu より</title>
		<link>http://weblog.linux-domain.net/2007/12/27/49.html/comment-page-1#comment-23</link>
		<dc:creator>rekkusu</dc:creator>
		<pubDate>Thu, 31 Jan 2008 02:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://linux-domain.net/weblog/2007/12/27/gdsh%e6%94%b9%e8%89%af%e3%81%97%e3%81%be%e3%81%97%e3%81%9f%e3%80%82/#comment-23</guid>
		<description>はじめまして！

ありがとうございます。
参考にさせていただきました。

私の環境では
alias grep=&#039;grep -n&#039;
と設定されているのと、
grepに-wオプションが存在しなかったのとで、
そのままではうまく動かなかったので、若干変更しました。
ついでに、ホントに行きたかったディレクトリに移動できているかどうかを
pwdで表示しています。

case $? in
    0 &#124; 1 )var=`dirs -v -l &#124;/usr/bin/grep &quot;^ *$newdir &quot; &#124;awk &#039;{printf(&quot;%s\n&quot;,$2)}&#039;`
        cd $var
        pwd;;
    * ) echo &quot; 数字以外が入力されました &gt;$newdir&quot; ;;
esac

追伸：
alias cd=&#039;pushd &gt; /dev/null&#039;と設定されているので
cdのみを入力した時に、pushdが実行されるので前回居たディレクトリに移動するのですが、
通常通り&quot;cd&quot;ではホームに移動&quot;cd -&quot;で前回のディレクトリに移動となると、
導入障壁がより低くなりますね。

&quot;cd ~&quot;とすればよいだけですが・・・。</description>
		<content:encoded><![CDATA[<p>はじめまして！</p>
<p>ありがとうございます。<br />
参考にさせていただきました。</p>
<p>私の環境では<br />
alias grep=&#8217;grep -n&#8217;<br />
と設定されているのと、<br />
grepに-wオプションが存在しなかったのとで、<br />
そのままではうまく動かなかったので、若干変更しました。<br />
ついでに、ホントに行きたかったディレクトリに移動できているかどうかを<br />
pwdで表示しています。</p>
<p>case $? in<br />
    0 | 1 )var=`dirs -v -l |/usr/bin/grep &#8220;^ *$newdir &#8221; |awk &#8216;{printf(&#8220;%s\n&#8221;,$2)}&#8217;`<br />
        cd $var<br />
        pwd;;<br />
    * ) echo &#8221; 数字以外が入力されました &gt;$newdir&#8221; ;;<br />
esac</p>
<p>追伸：<br />
alias cd=&#8217;pushd &gt; /dev/null&#8217;と設定されているので<br />
cdのみを入力した時に、pushdが実行されるので前回居たディレクトリに移動するのですが、<br />
通常通り&#8221;cd&#8221;ではホームに移動&#8221;cd -&#8221;で前回のディレクトリに移動となると、<br />
導入障壁がより低くなりますね。</p>
<p>&#8220;cd ~&#8221;とすればよいだけですが・・・。</p>
]]></content:encoded>
	</item>
</channel>
</rss>

