Article View: comp.unix.shell
Article #1031Help needed with conditional statement for alias in csh
From: Greg Miller
Date: Tue, 11 Sep 1990 20:05
Date: Tue, 11 Sep 1990 20:05
27 lines
1488 bytes
1488 bytes
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: <a4346@uwocc1.uwo.CA>
University of Western Ontario NetNorth: <A4346@UWOCC1.BITNET>
LONDON, Ontario, N6A 5B7 mailpath: {uunet!watmath,utai}!ria!a4346
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<6929.26ed0b53@uwovax.uwo.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!ria!uwovax!millerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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 <miller@ria.ccs.uwo.CA> Followup-To: J G Miller <miller@ria.ccs.uwo.CA> Organization: University of Western Ontario, LONDON, ON Lines: 27