•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 402,553 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,369 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 981 | Replies: 0
![]() |
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
hope someone can help...
I am trying to run a script via cron. the script runs fine interactively when logged in as oracle user. The script should run a hot back up of the database(oracle, RHEL3) of course the oracle sid and home path are set when running it manually. but when i run it as a cron job, it fails with error: egrep -c -e "^$ORACLE_SID:" $ORATAB
++ egrep -c -e '^:'
+ '[' 0 -ne 1 ']'
+ echo 'ERROR
atabase not in Oratab File '
/var/opt/mpower/bin/resback.sh: line 537: ${ERROR_FILE}: ambiguous redirect
+ exit
there is an entry in /etc/oratab for the db in question. I have also tried to run the .bash_profile in the script to supply the variables, i also tried to set them as cinstants in the script but no joy either.
i know its a big ask, but i have attached the script i am running it reads from the HOT BACKUP section of the script.
cheers
I am trying to run a script via cron. the script runs fine interactively when logged in as oracle user. The script should run a hot back up of the database(oracle, RHEL3) of course the oracle sid and home path are set when running it manually. but when i run it as a cron job, it fails with error: egrep -c -e "^$ORACLE_SID:" $ORATAB
++ egrep -c -e '^:'
+ '[' 0 -ne 1 ']'
+ echo 'ERROR
atabase not in Oratab File '/var/opt/mpower/bin/resback.sh: line 537: ${ERROR_FILE}: ambiguous redirect
+ exit
there is an entry in /etc/oratab for the db in question. I have also tried to run the .bash_profile in the script to supply the variables, i also tried to set them as cinstants in the script but no joy either.
i know its a big ask, but i have attached the script i am running it reads from the HOT BACKUP section of the script.
cheers
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Script wont run on different computer (Python)
- sendmail problem using cron (Shell Scripting)
- Log file rotation script (Perl)
- Please help to modify this perl script. I need to add more urls (Perl)
- need help w/ CRON job for backups (*nix Software)
- Server side script in asp won't run on Netscape (ASP)
- How to su properly in a shell script (Shell Scripting)
Other Threads in the Shell Scripting Forum
- Previous Thread: Desparate Need of Help!
- Next Thread: Giving input to a c++ file


Linear Mode