Is there something wrong with this statement? The variables come out ok and the files they reference do indeed exist, but when this runs, it jumps to the else statement.
if [ -f $mbdir/v${lastmon}${lastyear}.sas7bdat.gz ] and [ -f $mydir/logs/regcsr_20${year}-${month}-01.txt ] and [[ $day <= 10 ]]
then ghcsas $mydir/rvmetr.sas
else echo "All necessary files do not exist. This sas program did not run."
fi
if [ -f $mbdir/v${lastmon}${lastyear}.sas7bdat.gz ] and [ -f $mydir/logs/regcsr_20${year}-${month}-01.txt ] and [[ $day <= 10 ]]
then ghcsas $mydir/rvmetr.sas
else echo "All necessary files do not exist. This sas program did not run."
fi