LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Shell script inside shell script (https://www.linuxquestions.org/questions/linux-general-1/shell-script-inside-shell-script-364265/)

treotan 09-17-2005 01:39 PM

Shell script inside shell script
 
I have two shell scripts (#!/bin/sh), how it can integrate its? for example Shell script A need to be fire up/ call the Shell script B sometime. How it can do?

I tried, inside Shell script A, I added the path:
/etc/shell_scriptB

But it can't fire up/ call the shell script B! Why?
How it can do?

Thanks

david_ross 09-17-2005 01:43 PM

That should work so long as /etc/shell_scriptB exists and is executable for the user running the first script.

Without seeing the scripts and their permissions it is difficult to know what else it could be.

treotan 09-18-2005 03:14 AM

this is ok now! but i want to know the solution.
the shell script A can be call shell script B, but the shell script B need to do many task so it run very slow; then the Shell script A also run slowly by Shell script B. How the ss A can not be affected by ss B?

Thanks

eddiebaby1023 09-18-2005 06:44 AM

It's not clear from your post exactly what you want to do, but to let scriptB run without blocking scriptA, fire it off with an & after it
Code:

/etc/scriptB &
This will run it as a background process, leaving scriptA free to carry on without waiting for scriptB to finish. Use wait (man wait for detailed information) if scriptA needs to know that scriptB has finished.

clockorange 02-19-2009 06:34 AM

Quote:

Originally Posted by treotan (Post 1857901)
this is ok now! but i want to know the solution.
the shell script A can be call shell script B, but the shell script B need to do many task so it run very slow; then the Shell script A also run slowly by Shell script B. How the ss A can not be affected by ss B?

Thanks

Your English is soooooo POOR that I am struggling to understand what you mean!!!!


All times are GMT -5. The time now is 10:43 AM.