what am I missing?

I have the following portion of a script

Check()
{
echo "\n\nChecking that all constraints are Enabled"
echo "..."
sleep 2
CHECK_COUNT='sqlplus -s $1 <<-EOSQL4
set feed off pause off pages 0 head off;
set linesize 150 echo off;
select count(*) from user_constraints where status='DISABLED';"
quit;
EOSQL4'

if [ $CHECK_COUNT -eq 0 ]
then
    echo "\nThe following $CHECK_COUNT constraint(s) could not be enabled!"
    #sqlplus -s $1 <<-EOSQL
    #set feed off pause off pages 0 head off;
    #spool ref_con_errors.log;
    #select constraint_name,table_name from user_constraints where status='DISABLED';
    #spool off;
    #quit;
    #EOSQL
    #echo "\nPlease view 'ref_con_errors.log' for details on which constraints"
    echo ""
else
    echo "\nAll Constraints are enabled"
    echo ""
fi
}

this is the output I get from it:

Checking that all constraints are Enabled
...
Check[12]: -s: unknown test operator

All Constraints are enabled

How do I get rid of this error?

Thanks,
Zelp

CHECK_COUNT='sqlplus -s $1 <<-EOSQL4
set feed off pause off pages 0 head off;
set linesize 150 echo off;
select count(*) from user_constraints where status='DISABLED';"
quit;
EOSQL4'

See the two red tick marks - they need to be backtick characters.
Remove the red dash

i tried that and now I get

Checking that all constraints are Enabled
...
Check[12]: ORA-01740:: unknown test operator

All Constraints are enabled

anymore help?

if [ "$CHECK_COUNT" -eq 0 ]

also it seems like your sql does not return a NUMBER.... debug it stand-alone first.

select count(*) from user_constraints where status='DISABLED';"

yeah, it was that darn quote after 'DISABLED';

and BTW, you can leave the (minus) in the <<-EOSQL4

by adding the minus it removes any un-wanted TAB characters in the SQL.

Thanks so much guys!