spyro at f2s.com
Tue Oct 22 10:41:25 PDT 2002
On Tue, 22 Oct 2002 17:35:19 +0000 (UTC)
lfsbill at wlmcs.com (Bill Maltby - LFS Related) wrote:
> >> 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.
> You need to review man bash. There it talks about execution
> environments,invocation, inheritance, processes, etc. You need this
> basic understanding if you wish to avoid appearing *too* foolish. ;)
alternatively, one could give some helpful advice...
Whilst reading the bash manual wouldnt be a bad idea:
The reason it doesnt work is that the cd only applies in the environment
'inside' the script. Once the script exits, the environment it was
started from is in effect again.
Can we *please* avoid the LFS community mailinglists becomming like the
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