[comp.sys.amiga] C:Execute

ugkamins@sunybcs.uucp (John Kaminski) (04/10/89)

In article <7680.AA7680@heimat> sneakers@heimat.UUCP (Dan "Sneakers" Schein) writes:
[ piece chopped out ]
>   For those who did't know, "EXECUTE" looks in the S: directory automagicly.
>  So any script file in their can be started with just "EXECUTE script_file".
>  (Or "X script_file" if you rename "EXECUTE" ;-)
       ^^^                    ^^^^^^^^^^^^^^^
>
>  Sneakers
>    Dan "Sneakers" Schein            ////          BERKS AMIGA BBS
>    Sneakers Computing              ////   60+ Megs of software & messages
>    2455 McKinley Ave.      ___    ////         12/2400 Baud - 24 Hrs
>    West Lawn, PA 19609     \\\\  ////              215/678-7691
>                             \\\\////
>    {pyramid|rutgers|uunet}!cbmvax!heimat!sneakers   

I don't recommend that, at least under 1.3.  The std CLI and Shell look for
c:execute to run s:cli-startup and s:shell-startup.  I'm not real sure, but
I think the new script file-access-bit mechanism expects the same thing.
I sympathize completely, though.  I spent alotta time on a Pr1me 750, and
likewise needed a command to execute scripts (actually, it was more like
redirecting the stdin, because stuff in the file would substitute for key-
board input too).  The command was COMINPUT (COMmand INPUT), which, in its
minimum form, was CO.  So, what I did was copy execute to co.

I also hate typing in delete and a whole buncha others, so my c: looks
alot more like a UNIX /usr/bin or /bin (i.e. rm, mv, ls, cat, cp, etc.).
      //
     //
 \\ //
  \X/

papa@pollux.usc.edu (Marco Papa) (04/10/89)

>In article <7680.AA7680@heimat> sneakers@heimat.UUCP (Dan "Sneakers" Schein) writes:
>>   For those who did't know, "EXECUTE" looks in the S: directory automagicly.
>>  So any script file in their can be started with just "EXECUTE script_file".
>>  (Or "X script_file" if you rename "EXECUTE" ;-)

It is even better than that. Set the "script" bit with PROTECT fname +s and
then you don't even have to invoke execute. (I am not sure whether this is
documented anywhere, but it works!). Just type the name.

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

paolucci@snll-arpagw.UUCP (Sam Paolucci) (04/10/89)

In article <16430@oberon.USC.EDU> papa@pollux.usc.edu (Marco Papa) writes:
->>In article <7680.AA7680@heimat> sneakers@heimat.UUCP (Dan "Sneakers" Schein) writes:
->>>   For those who did't know, "EXECUTE" looks in the S: directory automagicly.
->>>  So any script file in their can be started with just "EXECUTE script_file".
->>>  (Or "X script_file" if you rename "EXECUTE" ;-)
->
->It is even better than that. Set the "script" bit with PROTECT fname +s and
->then you don't even have to invoke execute. (I am not sure whether this is
->documented anywhere, but it works!). Just type the name.

Of course, Marco forgot to say that typing in the name only, only works
with the Commodore Shell, and as far as I know WShell.
-- 
					-+= SAM =+-
"the best things in life are free"

				ARPA: paolucci@snll-arpagw.llnl.gov

alh@hprmokg.HP.COM (Al Harrington) (04/11/89)

/ papa@pollux.usc.edu (Marco Papa) / 10:18 pm  Apr  9, 1989 /
>It is even better than that. Set the "script" bit with PROTECT fname +s and
>then you don't even have to invoke execute. (I am not sure whether this is
>documented anywhere, but it works!). Just type the name.

One problem with this.  When you edit a file (I was using 'vi' from Manx C)
and save it the 's' bit is removed.

What a pain! 

+-----------------------------------------+---------------------------------+
| -Al Harrington                     //// |       Instant Guru BBS          |
|    ________                       ////  |        (916) 488-9278           |
|    |__/\__|                 \\\\ ////   |    120 Megs - All Amiga!        |
|                              \\\X///    |    Over 1000 files online       |
| alh@hprmo.HP.COM              \XXX/     |   Baud: 1200/2400 Hours: 24     |
| ..{hplabs,hp-sde}!hprmo!alh             |  PCPursuit:  CASAC 1200/2400    |
+-----------------------------------------+---------------------------------+
|  My comments in no way reflect the views or opinions of Hewlett-Packard   |
+---------------------------------------------------------------------------+

840445m@aucs.UUCP (Mic Mac) (04/11/89)

In article <16430@oberon.USC.EDU> papa@pollux.usc.edu (Marco Papa) writes:
>>In article <7680.AA7680@heimat> sneakers@heimat.UUCP (Dan "Sneakers" Schein) writes:
>>>   For those who did't know, "EXECUTE" looks in the S: directory automagicly.
>It is even better than that. Set the "script" bit with PROTECT fname +s and
>then you don't even have to invoke execute. (I am not sure whether this is
>documented anywhere, but it works!). Just type the name.
>
Wow!! is this with version 1.2?? I hope so!

-- 
% Alan W. McKay     %                                             %
% Acadia University %   " The world needs more Socrates           %
% Wolfville N.S.    %     walking the streets today "             %
% CANADA            %                       - S. Corbett          %

dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) (04/11/89)

:>In article <7680.AA7680@heimat> sneakers@heimat.UUCP (Dan "Sneakers" Schein) writes:
:>>   For those who did't know, "EXECUTE" looks in the S: directory automagicly.
:>>  So any script file in their can be started with just "EXECUTE script_file".
:>>  (Or "X script_file" if you rename "EXECUTE" ;-)
:
:It is even better than that. Set the "script" bit with PROTECT fname +s and
:then you don't even have to invoke execute. (I am not sure whether this is
:documented anywhere, but it works!). Just type the name.
:
:-- Marco Papa 'Doc'

	And, needless to say, when you type the script command directly the
shell searches your entire path ... so I have a directory called SC: which 
contains script files (all with the 's' bit set) which is in my command
path.  Poof.

					-Matt

odin@ucscb.UCSC.EDU (Jon Granrose) (04/11/89)

In article <16430@oberon.USC.EDU> you write:
>It is even better than that. Set the "script" bit with PROTECT fname +s and
>then you don't even have to invoke execute. (I am not sure whether this is
>documented anywhere, but it works!). Just type the name.
>
>-- Marco Papa 'Doc'

	Can someone please tell me what is required to make this happen.
Do I need the 1.3 ROMS?  I am running an A2000 with 1.2 ROMS, AmigaDOS 1.3,
1 Meg RAM, 40M hard drive.  I use Matt Dillon's Shell with ConMan and MachII.
Do I need to load the Shell-Seg or Execute with Resident or use the NewShell?
I have tried many different things but gave up after a few tries as I have
little need for scripts currently.  However, it is still highly annoying t
know that it doesn't work.  Thanks for any info.

Jon
 _____________________________________________________________________________
|Jon Granrose         |  ARPA: odin@ucscb.UCSC.EDU |CIS: 74036,3241|  // Only |
|Cowell College, UCSC |  UUCP: ...!ucbvax!ucscc!ucscb!odin         |\X/ Amiga!|
|Santa Cruz, CA 95064 |Bitnet: odin%ucscb.ucsc.edu@cunyvm.bitnet    ~~~~~~~~~~|
|"A mind is a terrible thing" "Remember, no matter where you go there you are"|
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rap@rap.ardent.com (Rob Peck) (04/11/89)

In article <6850@saturn.ucsc.edu> odin@ucscb.UCSC.EDU (Jon Granrose) writes:
>In article <16430@oberon.USC.EDU> you write:
>>It is even better than that. Set the "script" bit with PROTECT fname +s and
>>then you don't even have to invoke execute. (I am not sure whether this is
>
>	Can someone please tell me what is required to make this happen.
>Do I need the 1.3 ROMS?  I am running an A2000 with 1.2 ROMS, AmigaDOS 1.3,

The 1.3 PROTECT command sets the 's' bit, the 1.3 SHELL knows that if that
script bit is set, that IT (not the user) has to call EXECUTE to run the
script.




Rob Peck

raz@kilowatt.uucp (Raz- Berry) (04/12/89)

In article <6850@saturn.ucsc.edu> odin@ucscb.UCSC.EDU (Jon Granrose) writes:
>In article <16430@oberon.USC.EDU> you write:
>>It is even better than that. Set the "script" bit with PROTECT fname +s and
>>then you don't even have to invoke execute. (I am not sure whether this is
>>documented anywhere, but it works!). Just type the name.
>>
>>-- Marco Papa 'Doc'

A script ANYWHERE in your path (as setup BEFORE you exit your startup-cli) will
run without explictly typing 'Execute'.

This is why I always set my path as the very last thing I do in my startup-sequence
file.

>	Can someone please tell me what is required to make this happen.
>Do I need the 1.3 ROMS?  I am running an A2000 with 1.2 ROMS, AmigaDOS 1.3,
>1 Meg RAM, 40M hard drive.  I use Matt Dillon's Shell with ConMan and MachII.
>Do I need to load the Shell-Seg or Execute with Resident or use the NewShell?

Execute doesn't need to be resident (Shell-seg does though). You don't need the 
ROMS. I believe that you need to mount newcon: also.

>I have tried many different things but gave up after a few tries as I have
>little need for scripts currently.  However, it is still highly annoying t
>know that it doesn't work.  Thanks for any info.

>Jon

>|Jon Granrose         |  ARPA: odin@ucscb.UCSC.EDU |CIS: 74036,3241|  // Only |

	Yes, you have to run scripts from a SHELL, fortuneatly this is easy.
If you have 1.3 then you should just look at the original startup-sequence supplied
by Commodore. Or you could read the manual (could it be that simple?). 


-- 
Steve -Raz- Berry      Disclaimer: I didn't do nutin!
UUCP: sun!kilowatt!raz                    ARPA: raz%kilowatt.EBay@sun.com
"Fate, it protects little children, old women, and ships named Enterprize"

jim@syteke.UUCP (Jim Sanchez) (04/13/89)

You know this is funny but I cannot get my system to execute scripts
that are not in the current directory.  It is as if the PATH did not apply
to script files.  Of course I have set the "s" bit but am running conman
and wshell.  Has anyone else observed this??

-- 
Jim Sanchez  {sun,hplabs}!sun!sytek!syteke!jim OR
Sytek Brussels  mcvax!prlb2!sunbim!syteke!jim

drc@CSUStan.EDU (Dave Coughran) (04/15/89)

In article <208@syteke.UUCP> jim@syteke.UUCP (Jim Sanchez) writes:
>You know this is funny but I cannot get my system to execute scripts
>that are not in the current directory.  It is as if the PATH did not apply
>to script files.  Of course I have set the "s" bit but am running conman
>and wshell.  Has anyone else observed this??
>
>-- 
>Jim Sanchez  {sun,hplabs}!sun!sytek!syteke!jim OR
>Sytek Brussels  mcvax!prlb2!sunbim!syteke!jim

Wshell looks at the path file in the env: directory.  This directory must
be assigned somewhere (mine is RAM:env).  I don't think Wshell looks
at the AmigaDos path at all.  So, add assign env: <somewhere> to your
startup-sequence, and edit the file env:path and add s: (or wherever
you put your script files).

Hope this helps.

--David

mikes@lakesys.UUCP (Mike Shawaluk) (04/15/89)

In article <208@syteke.UUCP> jim@syteke.UUCP (Jim Sanchez) writes:
>You know this is funny but I cannot get my system to execute scripts
>that are not in the current directory.  It is as if the PATH did not apply
>to script files.  Of course I have set the "s" bit but am running conman
>and wshell.  Has anyone else observed this??

Have you also remembered to set the "e" (execute) bit?  It never occurred to
me that this was required, but I ran across a note to that effect when I was
installing ARP 1.3 last night (BTW, a great update!!  Get it, wherever you
can find it!  Hopefully it will be in comp.binaries.amiga soon!).  I must
have been lucky so far, in that my script files have all had the "e" bit
turned on by default!

-- 
   - Mike Shawaluk 
       (mikes@lakesys.lakesys.com  OR  ...!uunet!marque!lakesys!mikes)
    "Where were you on the night of August 12?"

riley@batcomputer.tn.cornell.edu (Daniel S. Riley) (04/15/89)

In article <1052@koko.CSUStan.EDU> drc@koko.UUCP (Dave Coughran) writes:
>Wshell looks at the path file in the env: directory.  This directory must
>be assigned somewhere (mine is RAM:env).  I don't think Wshell looks
>at the AmigaDos path at all.  

WShell looks at both the AmigaDOS path and env:path.  The search order is
1) previous command (if pure), 2) resident commands, 3) built-in commands,
4) rexx macros, 5) implicit directory, 6) current directory, 7) local
(i.e., AmigaDOS) path directories, 8) global (i.e., env:path) directories.
(Reference:  pre-release v1.0 wshell manual, chapther 4, page 21).

-Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley)
-Wilson Lab, Cornell U.

papa@pollux.usc.edu (Marco Papa) (04/16/89)

In article <208@syteke.UUCP> jim@syteke.UUCP (Jim Sanchez) writes:
>You know this is funny but I cannot get my system to execute scripts
>that are not in the current directory.  It is as if the PATH did not apply
>to script files.  Of course I have set the "s" bit but am running conman
>and wshell.  Has anyone else observed this??

It does work with C-A's NewShell, though.  You might want to give Bill
a call and tell me about it.

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=