if [ $UsedSpace -ge 50 ]
then
cd /ford/thishost/u/rct/www.80/crid/crid_new/cronjobs
$ORACLE_HOME/bin/sqlplus -s <<EOF > oracle.log
$DB_id/$DB_pswd@$DB_server
start test.sql
EOF
fi
I receive a syntax error. The syntax error must be the way I am wrapping the if clause because the line starting UsedSpace works fine. What am I doing wrong? Thanks for your help.
When our end-users run reports, we save a copy of the report on our web server. I want to create a shell script that is executed by CRON to occasionally clean out reports and free up disk space.
Here is the report.
When our end-users run reports, we save a copy of the report on our web server and to a db table. I want to create a shell script that is executed by CRON to occasionally clean out reports and free up disk space and remove the record from the db.
Here is the report.
first, Is the RemoveReport a stored procedure or function? If it is you can use the execute command otherwise you would have to use either 'start 'or '@'RemoveReports to indicate the sql file that you are trying to run.
Second.
open your shell in vi an do a set list. If you find any spaces at the end of the lines after the sqlplus invocation remove those spaces and give it a try.
I do use the vi editor, and when i turned on set list, Voila!
I took out all the white spaces wrapped around the sql statements and the script ran fine.
Thanks to you and all the others that have replied to my requests today!