Path: utzoo!utgpu!watserv1!ria!uwovax!miller From: miller@uwovax.uwo.ca (Greg Miller) Newsgroups: comp.unix.shell Subject: Re: Help needed with conditional statement for alias in csh Message-ID: <6932.26ed237f@uwovax.uwo.ca> Date: 11 Sep 90 21:48:47 GMT References: <6929.26ed0b53@uwovax.uwo.ca> Followup-To: j g miller Organization: University of Western Ontario, LONDON, ON Lines: 28 In article <6929.26ed0b53@uwovax.uwo.ca>, miller@uwovax.uwo.ca (Greg Miller) writes: > Hi! > > I have been having great problems in setting up an alias within csh. > > I want to test for the presence of a file, and if it exists then > to execute some statements e.g. > > > if ( { test -s /usr/spool/mail/miller } ) then; echo "" ; echo "New mail" ;\ > echo "" ; endif > Further to my original post, I have since found that the problem is not associated with the brackets around the expression but is related to the execution of test. If the file is present, the condition is met and the statements are executed. If the file is zero length, the condition is not true, then the sequence of commands are not executed but the if statement is not terminated. And ideas on why this bizarre behavior and how to get it to work properly? J G Miller