Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The cd command should result in the pwd command showing the path that cd went to. Yes when the script exits you will be where you were, but I did not think that we were making a script to cd somewhere are we?
Last edited by DavidPhillips; 11-04-2003 at 02:34 AM.
Iam not on a linux machine at the moment, so iam not sure of the
commands, iam asking u to try.
$/> which cd
This shows u whihc "cd" is being used.
$/> whereis cd
This wud show u what all other "cd's" are there. ( I know u have already tried this, just making sure with the command)
Try with all the other "cds" other than the one shown by which cd.
Even if it stil doesnt work, maybe try execting the script in the
current shell itself,
... why didn't i think of this earlier.. i tried ksh and problem solved. I still don't understand why it didn't work in the default shell, but i'm satisfied as long as it works. thx alot for all the help..
This was an obvious solution. If we had known from the beginning that bash was not the problem to be solved, we could have saved a lot of time. I guess I misunderstood what you were trying to accomplish. Makes you wonder what other problems you may run into with bash, but if you are happy ...
hehe... yes, i'm satisfied for now, but i wanna get down to the problem's source cuz i got the feeling i'll run in to it again.... i think for now thou, it has consumed more of my time than i wanted it to, so I'll leave it alone. ... but once i fugure out wth it was, i'll post it somewhere around here..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.