LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-17-2005, 01:39 PM   #1
treotan
Member
 
Registered: Jun 2004
Posts: 126

Rep: Reputation: 15
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
 
Old 09-17-2005, 01:43 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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.
 
Old 09-18-2005, 03:14 AM   #3
treotan
Member
 
Registered: Jun 2004
Posts: 126

Original Poster
Rep: Reputation: 15
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
 
Old 09-18-2005, 06:44 AM   #4
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
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.
 
Old 02-19-2009, 06:34 AM   #5
clockorange
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by treotan View Post
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!!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem executing mv command inside shell script pablogosse Linux - General 7 12-16-2009 12:21 PM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
changing the user inside a shell script sanjith11 Programming 2 04-22-2004 07:44 AM
Running FTP inside Shell Script truncates files jbhanc0125 Red Hat 3 01-16-2004 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration