The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Running KSH script In SFU ilak1008 Windows & DOS: Issues & Discussions 2 05-23-2007 11:17 PM
running cd from a script SkySmart Shell Programming and Scripting 5 03-08-2007 08:07 PM
when running my script below vbslim Shell Programming and Scripting 5 01-03-2006 08:11 PM
running a script? jtredway UNIX for Dummies Questions & Answers 2 09-11-2001 08:08 PM
Running a script from CDE... kristy UNIX for Dummies Questions & Answers 4 09-05-2001 07:33 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-05-2008
Registered User
 

Join Date: Jan 2008
Posts: 40
Stumble this Post!
My script is not running

I have wriiten the following scripts in UNIX. The file name is bk.ksh

rman target=/ << EOF
RUN {
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALLOCATE CHANNEL ch1 device TYPE
DISK FORMAT '/u01/oradata/ora/%U';
BACKUP DATABASE PLUS ARCHIVELOG;
SQL'ALTER DATABASE OPEN'
;}

EXIT;
EOF
when i try to run by chmod u+x /u01/oradata/ora/bk.ksh, i cant see if it ran successfully or not. i go to /u01/oradata/ora directory to see if the above scripts generated any output, i dont see nothing. How i can find out why my script is not running? Why it does not generated any output? Is there any way in UNIX to find out the mistakes? Please help.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 01-05-2008
Registered User
 

Join Date: Jan 2008
Posts: 40
Stumble this Post!
Please help guys. I am new in UNIX.
Reply With Quote
  #3 (permalink)  
Old 01-05-2008
Registered User
 

Join Date: Jun 2007
Location: Pennsylvania
Posts: 40
Stumble this Post!
At the top of your script put this in:

set -x



This will help you debug.
Reply With Quote
  #4 (permalink)  
Old 01-05-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,448
Stumble this Post!
Don't bump your thread up like that. It often takes hours or days to get a response. If you need immediate response, hire an expert.

chmod only sets the permission bit so it could be run. To run it you would then type:
./bk.ksh

If your interactive shell is ksh as well, it might work, but the first line really should be something like:
#! /usr/bin/ksh

but your path to ksh may be different. "which ksh" should show you the path if you don't know it. And if you have any further questions, post your version of unix which you can find with "uname -a".
Reply With Quote
  #5 (permalink)  
Old 01-05-2008
Registered User
 

Join Date: Jan 2008
Posts: 40
Stumble this Post!
I am sorry dude. I am apologized for that.

Quote:
Originally Posted by Perderabo View Post
Don't bump your thread up like that. It often takes hours or days to get a response. If you need immediate response, hire an expert.

chmod only sets the permission bit so it could be run. To run it you would then type:
./bk.ksh

If your interactive shell is ksh as well, it might work, but the first line really should be something like:
#! /usr/bin/ksh

but your path to ksh may be different. "which ksh" should show you the path if you don't know it. And if you have any further questions, post your version of unix which you can find with "uname -a".
Reply With Quote
  #6 (permalink)  
Old 01-05-2008
Registered User
 

Join Date: Jan 2008
Posts: 40
Stumble this Post!
$ uname-a
Sun os devdb 5.10 generic_125100-10 sun4U SUNW, SUN -FIRE-V445
Reply With Quote
  #7 (permalink)  
Old 01-05-2008
Registered User
 

Join Date: Jan 2008
Posts: 40
Stumble this Post!
Will i put this in allway top or after starting with <<EOF command?

Quote:
Originally Posted by syndex View Post
At the top of your script put this in:

set -x



This will help you debug.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0