[Coco] CHX broke? for 6309l2v030201

Boisy G. Pitre boisy at boisypitre.com
Wed Jul 14 11:55:53 EDT 2004


On Jul 14, 2004, at 10:22 AM, Paul T. Barton wrote:

> Versions:
> 6309-L2-V030201
> and the previous one too;
>
> Inside of a Ramdisk setup script I have:
> (at the end)
>
> blahblahblah
> CHX /R0/CMDS
>
> It never changes. When the script is done,
> typing "PXD" gives me /DD/CMDS instead of
> /R0/CMDS.
>
> What gives with this?
> No more CHX inside of a script?
>
Paul,

When a script is run, another instance of the shell is forked.  Any 
chd/chx in the script affects that shell, not the shell that spawned 
the shell to handle the script.

Assume I'm at a shell prompt.  I type:

pxd

and it responds:

/dd/cmds

Then I run a script called 'change' which contains:

chx /R0/CMDS

Upon returning from that script, my execution directory will still be 
/dd/cmds.

Now Charlie's problem is a bit different:

chx /h0/games/sierra/cmds
chd /h0/games/sierra
sierra </1

The 'sierra' command is being run from within the script after the 
chx/chd has been performed.

NitrOS-9 and OS-9 have always worked this way.

Boisy




More information about the Coco mailing list