# not honored?

Tim McDaniel mcdaniel at amara.uucp
Thu Mar 29 05:37:21 AEST 1990


I'm using "Sun OS 4.0.3" on a Sun 3.

Given the two scripts
	25.sh:
		./25.csh
	25.csh:
		#
		if (1 == 1) then
			echo Hi
		else
			echo Impossible
		endif

Executing "./25.sh" gives the Bourne shell error message
	./25.csh: syntax error at line 7: `end of file' unexpected

There's an easy workaround: make the first line of a C-shell script
	#! /bin/csh -f

But I had thought that "#" as the first byte of a file meant "this is
a C shell script" (unless, of course, the first two bytes are "#!").
It appears that the Bourne shell does not respect this rule.
Should it?  (On systems where the C shell exists and uses this
convention.)


--
Tim McDaniel
Applied Dynamics International, Ann Arbor, MI
Internet: mcdaniel%amara.uucp at mailgw.cc.umich.edu
UUCP: {uunet,sharkey}!amara!mcdaniel



More information about the Comp.unix.questions mailing list