Hi,
I am trying to execute this small shell script in cshell, I am getting
if: Empty if.
Error.
----------------------
#!/bin/csh
setenv COMP_FILES /NR/difference_files
#/usr/sbin/sendmail
user1@abc.com < $COMP_FILES/taskcomp/diff_task_tue_wed.txt
setenv DAY `date | sed 's/ .*//'`
#Email of comparison files
if ($DAY == Mon)
then
/usr/sbin/sendmail
user2@abc.com < $COMP_FILES/taskcomp/diff_task_fri_mon.txt ;
else if ($DAY == Tue)
then
/usr/sbin/sendmail
user2@abc.com < $COMP_FILES/taskcomp/diff_task_mon_tue.txt;
else if ($DAY == Wed)
then
/usr/sbin/sendmail
user2@abc.com < $COMP_FILES/taskcomp/diff_task_tue_wed.txt;
else if ($DAY == Thu)
then
/usr/sbin/sendmail
user2@abc.com < $COMP_FILES/taskcomp/diff_task_wed_thu.txt;
else if ($DAY == Fri)
then
/usr/sbin/sendmail
user2@abc.com < $COMP_FILES/taskcomp/diff_task_thu_fri.txt;
else
echo "try again"
endif
----------------------------