Xref: utzoo comp.unix.wizards:21148 comp.unix.questions:20789 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ncar!mephisto!uflorida!novavax!hcx1!brad From: brad@SSD.CSD.HARRIS.COM (Brad Appleton) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Possible big in C-Shell Summary: problem with here documents in an if--else Keywords: csh, sh, here document, script Message-ID: <3378@hcx1.SSD.CSD.HARRIS.COM> Date: 22 Mar 90 15:01:10 GMT Sender: news@hcx1.SSD.CSD.HARRIS.COM Organization: Harris Computer Systems, Fort Lauderdale, FL Lines: 74 I apologize if this was brought up before; I have not seen it here... I am having a problem in the C-Shell. I have a here document inside an if statement, and the here document contains the word "else". When the "if" condition is false, it seems that the "else" part of the here document is executed. I have isolated the problem into a simple script: foreach i (foo bar) echo "i=$i" if ( $i == foo ) then cat >tmp <tmp <