<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>
<div>-Narahari<br><br></div>
<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">ale-at-ale.org</a>@<a href="http://unpopularminds.org">unpopularminds.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Fri, Sep 17, 2010 at 5:44 PM, Narahari &#39;n&#39; Savitha<br>&lt;<a href="mailto:savithari@gmail.com">savithari@gmail.com</a>&gt; wrote:<br></div>
<div class="im">&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 class="h5">_______________________________________________<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></div></div></blockquote></div><br>