Oh yes. The problem is that you're no longer calling the script on a terminal making stty show that message so my suggestion above won't really help sorry. Perhaps modifying the script to work with non-terminal input and output might help.
Perhaps using a tty emulator or virtualizer like screen, expect, or ttyrec and the likes would help perhaps.
When running with cron, remember that you don't actually have a terminal. If your script issues stty commands, then you will get this error. You either have to handle the error, live with it or exclude it in the cron entry.
So you could in the script find and edit lines like this:-
stty erase ^H 2>/dev/null
Check any .profile, /etc/profile and called / sourced scripts too, perhaps to include .kshrc .bash_rc or similar.
whether i should use csh or not, but 1 thing is sure that by removing ` sign from sqlplus, it has stopped writting in the output file.
sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID << EOF > sql_output.txt
select count(*) from bravo_statistics
where trunc(time_stamp)=trunc(sysdate)
and description in ('BEGIN NIT','END MR');
EOF
If you're running this through cron you need to ensure that your environment is properly configured (usually by sourcing your ~/.profile and setting up your Oracle environment, etc.).
I've already given you my suggestion: Stop using the C-Shell.
You haven't shown us your entire script. Of the six lines you did show, one was Bourne shell, and you seem to have wrongly deduced that the error is somewhere it is not.
I haven't used C-Shell in the best part of 20 years - and for good reason - it's rubbish, really rubbish! Just because "other scripts" in the directory uses it doesn't mean you have to!
Please post your entire script so we can see the big picture instead of doing this piecemeal.
Are the Oracle variables set up in the ~/.bash_profile?
$ cat scr1
#!/bin/bash
# *** Lovely Sethi 08/2013 ***
# This process executes the BRAVO_MAIN_REFRESH.sql
#
# This file should be scheduled in CRONTAB to run each Big run.
. ~/.bash_profile 2> /dev/null >&2
sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID << EOF > sql_output.txt
select count(*) from bravo_statistics
where trunc(time_stamp)=trunc(sysdate)
and description in ('BEGIN NIT','END MR');
EOF
big_cnt=$(sed -n '4p' sql_output.txt)
if [ $big_cnt -eq 0 ] ; then
sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID << EOF >> sql_output.txt
select nvl(description,'0') from bravo_statistics
where trunc(time_stamp)=trunc(sysdate)
and description='END CAT';
EOF
sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID << EOF >> sql_output.txt
select count(*) from mrs.bill_cal
where trunc(actual_run_date)=trunc(sysdate)-19;
EOF
end_ct=$(sed -n '9p' sql_output.txt)
emtr_cnt=$(sed -n '14p' sql_output.txt)
if [ "$end_ct" = "END CAT" ] && [ $emtr_cnt -eq 1 ]; then
sqlplus $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID @/uv1402/u207/home/bravodba/bestdbscript/sqlscriptfiles/BRAVO_MAIN_REFRESH.sql
/uv1402/u207/home/bravodba/bestdbscript/shscriptfiles/sendmailanalysisrefresh.sh
echo "value found"
fi
fi
$ bash -n scr1
(no output - syntax is valid)