Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: Line at a time scripts in csh Message-ID: <891@auspex.UUCP> Date: 25 Jan 89 21:09:34 GMT References: <4116@paris.ics.uci.edu> <909@ubu.warwick.UUCP> <7296@ihlpf.ATT.COM> <872@auspex.UUCP> <7372@ihlpf.ATT.COM> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 27 >I just wrote the script as given, and tried it with sh, ksh, and csh, and it >worked for all three. The "csh" on your system must be something other than the C shell, then, because the C shell is quite different from the Bourne shell, and it complained as soon as it saw ifs_def=$IFS because it said that IFS was an undefined variable; when I defined it, it gave ifs_def=: Command not found. instead. The way you set shell variables is different in the C shell, so it didn't like "ifs_def=$IFS". Most non-trivial Bourne shell scripts probably don't work at all if you run them under the C shell. (Obligatory clarification, to ward off "Wrong! See, here's *my* trick for doing that" postings: Most non-trivial Bourne shell scripts probably don't work at all under the C shell unless you do a Larry Wall-style "ooops, wrong shell, I'll feed myself to 'sh'" trick, or have some other trick, perhaps along the lines of those programs that represented valid C, Pascal, and FORTRAN source through clever use of the three languages' comment conventions.)