home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / ultrix / 6698 < prev    next >
Encoding:
Text File  |  1992-09-04  |  1.1 KB  |  34 lines

  1. Newsgroups: comp.unix.ultrix
  2. Path: sparky!uunet!stanford.edu!kronos.arc.nasa.gov!iscnvx!lange
  3. From: lange@iscnvx.lmsc.lockheed.com (Alex Lange)
  4. Subject: First Line Comments in Scripts
  5. Message-ID: <1992Sep4.183234.29076@iscnvx.lmsc.lockheed.com>
  6. Reply-To: lange@lmsc.lockheed.com
  7. Organization: Lockheed Missiles & Space, Sunnyvale CA USA
  8. X-Newsreader: Tin 1.1 PL4
  9. Date: Fri, 4 Sep 92 18:32:34 GMT
  10. Lines: 22
  11.  
  12. It seems as though ULTRIX 4.2 insists that all shell scripts
  13. run in the C shell, ignoring the $SHELL variable.
  14.  
  15. My $SHELL is /bin/sh.  My scripts have first lines that look like this:
  16.  
  17. # @$-r name of job
  18. set -x
  19.  
  20. (These are directives for the NQS batch system on some machines.)
  21. I can run these scripts interactively or in batch on non-ULTRIX
  22. machines because the directive looks like a comment to most UNIXes.
  23.  
  24. But ULTRIX runs these scripts in csh. I have to add #!/bin/sh 
  25. to force what should be my default shell!
  26.  
  27. The same behavior happens with commented SCCS files (with
  28. # @(#) on line one).
  29.  
  30. Is this a well known flaw in ULTRIX (I haven't located the FAQ
  31. for this group)? or something peculiar with my system?
  32.  
  33. Alex Lange
  34.