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 'n' Savitha <span dir="ltr"><<a href="mailto:savithari@gmail.com">savithari@gmail.com</a>></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"><<a href="http://ale-at-ale.org" target="_blank">ale-at-ale.org</a>@<a href="http://unpopularminds.org" target="_blank">unpopularminds.org</a>></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 'n' Savitha<br><<a href="mailto:savithari@gmail.com" target="_blank">savithari@gmail.com</a>> wrote:<br></div>
<div>> I remember using cd in the following way.<br>><br>> $pwd<br>> /this/is/the/folder/that/all/are/in/now<br>><br>> The folder structure till the that is<br>> $ls /this/is/the/folder/that/<br>
><br>> all<br>> males<br>> females<br>><br>> I was able to do this<br>><br>> $cd all males<br>> $pwd<br>> /this/is/the/folder/that/males/are/in/now<br>> $cd males females<br>> /this/is/the/folder/that/females/are/in/now<br>
<br></div>If you'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't know of a 'cd' specific one to do that, but it's simple to<br>
write a bash function:<br><br>function cd () {<br> if [ -n "$2" ] ; then<br> nd=`pwd | sed 's/'$1'/'$2'/'`<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>