Help needed with conditional statement for alias in csh
Greg Miller
miller at uwovax.uwo.ca
Wed Sep 12 06:05:38 AEST 1990
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 at uwocc1.uwo.CA>
University of Western Ontario NetNorth: <A4346 at UWOCC1.BITNET>
LONDON, Ontario, N6A 5B7 mailpath: {uunet!watmath,utai}!ria!a4346
-------------------------------------------------------------------------------
More information about the Comp.unix.shell
mailing list