![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delimiters missing | Indalecio | Shell Programming and Scripting | 2 | 02-23-2007 01:28 AM |
| Missing functions HELP! | sha1024 | High Level Programming | 1 | 02-05-2007 12:06 PM |
| missing CDE | frankkahle | SUN Solaris | 5 | 05-25-2006 02:35 PM |
| /tmp is missing ???? | BAM | UNIX for Dummies Questions & Answers | 1 | 11-05-2002 11:50 AM |
| /dev/fb* missing | heinb | UNIX for Dummies Questions & Answers | 5 | 02-12-2002 02:22 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have the following portion of a script
Code:
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
}
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
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' Remove the red dash |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
||||
|
||||
|
Code:
if [ "$CHECK_COUNT" -eq 0 ] select count(*) from user_constraints where status='DISABLED';" |
|
#5
|
|||
|
|||
|
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! |
|||
| Google The UNIX and Linux Forums |