Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!mephisto!ukma!acp From: acp@ms.uky.edu (ACP Network) Newsgroups: comp.unix.questions Subject: Problem with scripts in ksh Message-ID: <13632@s.ms.uky.edu> Date: 9 Jan 90 19:27:46 GMT Reply-To: acp@ms.uky.edu (ACP Network) Distribution: na Organization: U of Kentucky, Mathematical Sciences Lines: 32 I hesitate to call this a bug right away, but ksh on two of our machines seems to have trouble executing scripts. I've tested this on a vax running ultrix (3.1?) and a sequent running dynix, with the same results. Any script that starts out with #!/bin/ksh executes fine as long as the statements are internal to ksh (eg, echo, if/then/fi, etc) but hangs after executing the first external command (I've tested it with ps, cat, grep, and sed). For instance, a script such as #!/bin/ksh ps -a echo 'done.' executes the ps -a then hangs with no message. ^C will break out of it, but the second echo never executes. Any statements internal to ksh placed before the ps line will execute normally. Taking out the #!/bin/ksh line makes the script work properly (my default shell is ksh anyway). Changing it to #!/bin/sh or #!/bin/csh makes the script work properly (if the internal commands are compatible with the new shell, of course). It also runs properly on a machine running SYSV/386 3.2. Is this some obscure feature I don't know about? :-) Kenneth Herron -- acp@ms.uky.edu University of Kentucky ACP Network Consultant ukma!acp Dept. of Mathematics, room 715 POT (606) 257-2975 Lexington, KY 40506