Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!kilowatt!raz From: raz%kilowatt@Sun.COM (Steve -Raz- Berry) Newsgroups: comp.sys.amiga Subject: Re: No K directive? Keywords: obscure bug? Message-ID: <96567@sun.Eng.Sun.COM> Date: 30 Mar 89 00:57:59 GMT References: <9888@polyslo.CalPoly.EDU> Sender: news@sun.Eng.Sun.COM Reply-To: raz@sun.UUCP (Steve -Raz- Berry) Distribution: usa Organization: Sun Microsystems, Mountain View Lines: 56 In article mp1u+@andrew.cmu.edu (Michael Portuesi) writes: )nschultz@polyslo.CalPoly.EDU (Ned W. Schultz) writes: )) Could someone please explain the message, "No K directive."? A friend )) is getting this when using the hd startup sequence from the 1.3 disks. )) He tries to "execute dh0:s/hd-startup" and execute fails, breaking )) [more stuff relating to system specifics that aren't necessary] )Funny, I had this problem too -- only it happened with my )startup-sequence. When writing scripts for the EXECUTE command, the K )or "KEY" directive is used to determine what the argument template for )the Execute script is to look like. [example deleted] This is correct. )I boot off a floppy, whose startup-sequence transfers control to the )hard disk as soon as possible. It EXECUTEs a startup-sequence on the )hard disk. For some reason I have never been able to determine, the )startup-sequence on my hard disk would fail to run with the "No K )directive" error. I eventually fixed the problem by putting ).k foobar/k )as the first line in my startup-sequence, though someday I would like )to know why I had to do that. It certainly didn't seem necessary. It wasn't exactly. Although it will work sometimes. I have had similar problems when I decided to make my startup-sequence do some fancy footwork (a script calls a script calls a script, with the ending of each terminating the previous). Anyway, with the help of Bill Hawes we (he) traced it to the occurance of a line that did file redirection. An example: 'run nil: dmouse foo bar c` What happens is that Execute parses the script BEFORE it is run and looks for the '<' and '>' characters to bracket passed variables to the script, and then do variable substitution based on the '.key' command. Instead what it finds is the perfectly reasonable redirection, and decides that it can't match a variable, since there was no '.k' directive to tell it to expect one. One way around this mess is to change the bracket characters to something reasonable (ie, not used often). I like: .bra { .ket } Adding these two lines to the start of a script should help. )Michael Portuesi / Information Technology Center / Carnegie Mellon University )INET: mp1u+@andrew.cmu.edu / BITNET: mp1u+@andrew )UUCP: ...harvard!andrew.cmu.edu!mp1u+ Steve -Raz- Berry UUCP: sun!kilowatt!raz "Fate, it protects little children, old women, and ships named Enterprize"