(no subject)

Richard Lightman richard at nezumi.plus.com
Tue Oct 22 05:29:37 PDT 2002

* Charles Hause <rhubarbpie at mail.com> [2002-10-22 13:20]:
> For instance, if I type cd /bob, I change into the bob directory.  If
> I create a script containing cd /bob nothing happens.  I've made the
> script executable and I invoke it with ./scriptname.sh.  Other
> commands work in scripts but to my knowledge only cd won't work.
> Should this be?

In this script, you changed the current directory of the process
running the script. Noth the process of your shell. Add pwd to
your script, and you will see the cd worked, even though it did
not do what you wanted.

A process cannot change the working directory of another process
directly. The best answer is probably to type cd in you shell.
If you can stand aliases you could try something like:

alias up='cd ..'

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list