Dear friends,
I am writing a script usiing c-shell.
iwant if -else syntax in c-shell
i have taken twovariables and in one variable iam storing sysdate.and comparing with other variable
if both are same then iam renaming file as oct_2005.
please see below code
set mon=`date +%m`
set yer=`date +%Y`
set dat=`date +%d`
set pass=`cal $mon $yer | sed '/^$/d' | tail -1 | awk '{printf $NF}'`
echo $pass
set vrfir=`expr $pass - 1`
echo $vrfir
echo $dat
echo $pass
if test $dat == $vrfir ; then
mv schedule $montmp$yer
#else
#mv schedule $montmp$yer
fi
regards
rajan