csh question
Conor P. Cahill
cpcahil at virtech.uucp
Mon Nov 13 23:49:16 AEST 1989
In article <1989Nov13.014412.24735 at Neon.Stanford.EDU>, kamens at Neon.Stanford.EDU (Samuel N Kamens) writes:
> if ($1 == foo) then
> /usr/ucb/talk foo at bar
> else
> /usr/ucb/talk $1
> endif
>
> When I run it, I get an error (error: end of file unexpected).
This works correctly under the csh, but gives the error you indicate when
run under the borne shell, so you are probably not running it under the
csh (even though you call it from the csh prompt).
To ensure that the csh is used to process it, add the following to the
beginning of the file:
#!/bin/csh
I believe the # must be in column 1. Note that this will not work when
the user is using the borne shell as his command interpreter on most non-BSD
based systems.
--
+-----------------------------------------------------------------------+
| Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 !
| Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 |
+-----------------------------------------------------------------------+
More information about the Comp.unix.questions
mailing list