[comp.sys.amiga.tech] AmigaDOS scripts and SKsh

vu0235@bingvaxu.cc.binghamton.edu (vu0235) (07/17/90)

This article is about a question I have on SKsh, Steve Koren's shell.  
Before I say what my question is, here is some information about my 
configuration:  1) I have version 1.3 of SKsh, 2) I start SKsh with 
'newcli from cliksh window "con:0/0/640/400/Sksh_Window"'.  cliksh is the 
file I use to set up Sksh and it is listed below:
		Prompt "%N.%S> "
		stack 16000
		sksh
Additionally, I use the .skshinit and .skshrc files provided with the program,
with some additional aliases and additions to the path in .skshrc.

Ok, here is my question:  When I try to execute an AmigaDOS script, the
script will not execute until I give Sksh the exit command, then since I
have not set LOGOUT='endcli', control is returned to the CLI and then the
script executes, i.e, what happens is that when I try to execute the script,
all that happens is that I get back the Sksh prompt and I can just go on
and do whatever I want, but when I exit, suddenly the script executes.
I have tried two different scripts including one that just echoed 
a sentence.  I have set the script bit and put the line ;!c:execute at the
beginning of the script as specified by the documentation.  Also, I have
tried the source command and the execute command directly but the result
is always the same.  Any help that can be given is appreciated.


					Christopher H. Schuck

-- 
Christopher H. Schuck                                                //
Dept. of Math. Sci., SUNY-Binghamton, Binghamton, NY 13901       \\ //
vu0235@bingvaxu.cc.binghamton.edu                                 \X/

jdickson@jpl-mil.jpl.nasa.gov (Jeff Dickson) (07/17/90)

	From the articles I have seen, it is evident that the MMU in the
A3000 is being used in some capacity. Could someone please define that
capacity? I read an article in Amiga World a couple months ago that de-
scribed the machine, but beats the hell out of me why this topic was not
discussed.

---------------------------------------------------------------------------
Jeff S. Dickson					jdickson@zook.jpl.nasa.gov

koren@hpfelg.HP.COM (Steve Koren) (07/18/90)

> Ok, here is my question:  When I try to execute an AmigaDOS script, the
> script will not execute until I give Sksh the exit command, then since I
> have not set LOGOUT='endcli', control is returned to the CLI and then the
> script executes, i.e, what happens is that when I try to execute the script,

The best I can do at the moment is to offer this, which I've taken from the
yet-unreleased addendum to version 1.5:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          A Word about Command Invocation under SKsh

            SKsh  does  not  actually invoke external commands itself.  In-
            stead, it builds a  command line with all passed parameters and
            passes this  command line to ARP.  However, there are differing
            requirements  for  various types of AmigaDos  programs (such as
            BCPL  versus  Lattice C).  Occasionally ARP will fail to invoke
            a  particular program correctly.  It does quite a good job con-
            sidering  the  situation, but sometimes it will fail.  I unfor-
            tunately  cannot  do  anything about this in SKsh, so if  there
            are few  programs you cannot invoke correctly, you will have to
            invoke them from the AmigaDos shell.

            Fortunately,  however,  AmigaDos  2.0  will  provide a standard
            method  of  program invocation.  When I can compile SKsh to use
            that  feature,  the  problem will be eliminated.   (That  will,
            however, mean that SKsh will run only under AmigaDos 2.0)   Un-
            til then, there is nothing I can do to help.  Sorry!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I realize that's not much help right now, but there's not much I can do.
I tried around 4 different methods of program invocation before
settling on ARP as the best, but its not perfect.  The good news is that
Commodore has provided a "real" method to invoke programs under
2.0 (bravo!).

   - steve