[Coco] Nitors9 Shell+ scripting
Robert Gault
robert.gault at worldnet.att.net
Sun Aug 5 09:55:47 EDT 2007
Gene Heskett wrote:
> On Sunday 05 August 2007, Paul Fitch wrote:
>
>>I'm looking for a primer on shell+ scripting.
>>
>>In my startup file there is the following code:
>>-x
>>chd /dd
>>x
>>
>>My shell+ help doesn't mention the "x" at all. What does it do?
>
>
> I believe, and someone please correct me if I'm wrong, that the -x turns off
> the shells error exit so the script, which the startup file is, does not exit
> if the command fails, in this case the "chd /dd". Conversely, the single x
> turns it back on.
>
That is correct. However, the script doesn't make much sense. If /dd is
the same drive you booted from, there can't be any need for error
checking and the command chd /dd serves no purpose. In normal usage, /dd
is either /d0 or /h0. In either case where you boot from /d0 and /dd=/h0
or you boot from /h0 and /dd=/d0, I can't think of any good reason for
that setting of /dd. Just make /dd the same as the boot drive.
More information about the Coco
mailing list