Path: utzoo!utgpu!watserv1!ria!uwovax!miller From: miller@uwovax.uwo.ca (Greg Miller) Newsgroups: comp.unix.shell Subject: Help needed with conditional statement for alias in csh Summary: Anybody know how to do this? Keywords: alias, conditional, expression Message-ID: <6929.26ed0b53@uwovax.uwo.ca> Date: 11 Sep 90 20:05:38 GMT Reply-To: J G Miller Followup-To: J G Miller Organization: University of Western Ontario, LONDON, ON Lines: 27 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 The above does not work because when executed the endif statement is not reached. The problem appears to be related to the brackets associated with the expression in the condition. Could somebody please tell me what I am doing wrong and how to do this in a one line command that can be aliased? Thanks! J G Miller telephone: (519) 679-2111 extension 6325 Room 024, Chemistry Building InterNet: University of Western Ontario NetNorth: LONDON, Ontario, N6A 5B7 mailpath: {uunet!watmath,utai}!ria!a4346 -------------------------------------------------------------------------------