shell function version will occur first choice by default. To force a system function instead, give full path to the binary location in the filesystem.<br><br><div class="gmail_quote">On Wed, Sep 22, 2010 at 12:25 PM, Narahari &#39;n&#39; Savitha <span dir="ltr">&lt;<a href="mailto:savithari@gmail.com">savithari@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Thank you. It is what I was looking for.</div>
<div> </div>
<div>How do you tell the shell use the cd function instead of the inbuild cd.</div>
<div> </div><font color="#888888">
<div>-Narahari<br><br></div></font><div><div></div><div class="h5">
<div class="gmail_quote">On Mon, Sep 20, 2010 at 5:00 PM, Don Lachlan <span dir="ltr">&lt;<a href="http://ale-at-ale.org" target="_blank">ale-at-ale.org</a>@<a href="http://unpopularminds.org" target="_blank">unpopularminds.org</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="padding-left: 1ex; margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);">
<div>On Fri, Sep 17, 2010 at 5:44 PM, Narahari &#39;n&#39; Savitha<br>&lt;<a href="mailto:savithari@gmail.com" target="_blank">savithari@gmail.com</a>&gt; wrote:<br></div>
<div>&gt; I remember using cd in the following way.<br>&gt;<br>&gt; $pwd<br>&gt; /this/is/the/folder/that/all/are/in/now<br>&gt;<br>&gt; The folder structure till the that is<br>&gt; $ls /this/is/the/folder/that/<br>
&gt;<br>&gt; all<br>&gt; males<br>&gt; females<br>&gt;<br>&gt; I was able to do this<br>&gt;<br>&gt; $cd all males<br>&gt; $pwd<br>&gt; /this/is/the/folder/that/males/are/in/now<br>&gt; $cd males females<br>&gt; /this/is/the/folder/that/females/are/in/now<br>

<br></div>If you&#39;re trying string replacement in bash:<br><br>bash$ cd /usr/lib<br>bash$ pwd<br>/usr/lib<br>bash$!?cd?:s/usr/var/<br>bash$ pwd<br>/var/lib<br><br>I don&#39;t know of a &#39;cd&#39; specific one to do that, but it&#39;s simple to<br>

write a bash function:<br><br>function cd () {<br> if [ -n &quot;$2&quot; ] ; then<br>   nd=`pwd | sed &#39;s/&#39;$1&#39;/&#39;$2&#39;/&#39;`<br>   builtin  cd $nd<br> else<br>   builtin cd $1<br> fi<br>}<br><br>bash$ cd /usr/lib/<br>

bash$ pwd<br>/usr/lib<br>bash$ cd usr var<br>bash$ pwd<br>/var/lib<br><font color="#888888"><br>-Lachlan<br></font>
<div>
<div></div>
<div>_______________________________________________<br>Ale mailing list<br><a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br><a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>

See JOBS, ANNOUNCE and SCHOOLS lists at<br><a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br></div></div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br>I would rather stumble along in freedom than walk effortlessly in chains.<br><br><br>