Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.ultrix Subject: Re: Bug in /bin/sh?? Message-ID: <1879@auspex.auspex.com> Date: 5 Jul 89 21:10:58 GMT References: <400@mipos3.intel.com> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 23 >...instead under Ultrix it reports an error message like: > > /tmp/sh108410: cannot open > >I've tried this under SunOS 4.0 and it works as expected. Is this a known >problem with Ultrix? It sounds similar to another known problem with older versions of the Bourne shell, in which the shell gets confused about the name of the "here document" file (the thing between "<<" and the end-of-file marker). The known problem in question was fixed in some later version of the Bourne shell (the S5R2 version, I think), and this problem may have been fixed there as well. SunOS has used an S5R2-or-later version of the Bourne shell as "/bin/sh" since SunOS 3.0; presumably, Ultrix is still using the V7-vintage BSD version as its "/bin/sh". If you have a System V shell as "/bin/5sh" or somesuch, you might try using that to run your script (using the "#!" mechanism) instead (although putting something like "/bin/5sh" or somesuch into the "#!" line means your script won't work on systems that don't have a program with that pathname, so your script may work only on Ultrix if that line is there).