Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripting help

Status
Not open for further replies.

cgswong

MIS
Nov 27, 2000
202
US
Hi all, I'm having a little trouble with a script I wrote. The script shuts down all the databases and does a backup of necessary file systems. After the backup the databases are started back with a script the vendor wrote. The problem is that when their script runs it doesn't terminate and give back the command line. It does what its supposed to do does not give back the command line, it just sits their and I have to kill the process, or break out to end the script.

Can someone tell me what's wrong? Any help is appreciated, thanks.

- Stu
 
when you kill the script has it finished doing everything it needs to?

it doesn't run a program that need to stay running does it?

if not have you found the line/section in the vendors script that stalls?

if all else fails you could always run the command spawned '&' command ...

Jon.
 
No there's nothing that needs to run, and the vendor script seems okay. I already tried running it as spawned but that didn't work (that was surprising). Anything other ideas please?
 
it doesn't have any 'sleep' commands or loops?

is it a big file? you could post it, or mail it to mailto:tektips@saiman.demon.co.uk

Jon
 
I've sent the relevant section of the script to the address you specified. Thanks.
 
right ... the script you've sent me seems sound ... but you might be in a loop when you call it, that might cause the problem ...

apart from lots of variables that it greps for (that i don't have set) and lots of variables that it prints (which i also don't have set) it is a basic list of if-then-else's checking for running processes, it doesn't actually run anything except ps and grep.

if this subsection is in the same file as the calling file, have you got an 'exit' statement anywhere in your script?

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top