Calling multiple scripts

Reply

Join Date: Nov 2009
Posts: 15
Reputation: whizkidash is an unknown quantity at this point 
Solved Threads: 0
whizkidash's Avatar
whizkidash whizkidash is offline Offline
Newbie Poster

Calling multiple scripts

 
0
  #1
20 Days Ago
Hi Team,

I have multiple shell scripts created(already prepared), but my Project Manager insisted me to run/call the script as one script..
eg:
Script1-"It finds whether file exist or not"
Script2-"It replace a word in a file"
Script3-"it searches the line and linenumber of a file"


i need to run jst one script(main) which will perform all the scripts to execute.. How is it done

Thanks for your patience!

Cheers!
Whizkidash
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2,031
Reputation: Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of 
Solved Threads: 177
Aia's Avatar
Aia Aia is offline Offline
Postaholic
 
1
  #2
19 Days Ago
What's the trouble?
In its simplest form, create another executable script with three lines of text, where each line is the absolute path to those three scripts.
Last edited by Aia; 19 Days Ago at 12:31 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 15
Reputation: whizkidash is an unknown quantity at this point 
Solved Threads: 0
whizkidash's Avatar
whizkidash whizkidash is offline Offline
Newbie Poster
 
0
  #3
19 Days Ago
Hi can u pls expalin as to how to call the scripts and name it absolute paths..

As all the above scripts are interactive..
I might be asking u bit wired question, but pls assist me to my desired result...

Regards
Whizkidash
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,215
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 573
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #4
18 Days Ago
Main script (main.sh):
Shell Scripting Syntax (Toggle Plain Text)
  1. #!/bin/bash
  2. /tmp/daniweb/s/f1.sh
  3. /tmp/daniweb/s/f2.sh
  4. /tmp/daniweb/s/f3.sh

f1.sh:
Shell Scripting Syntax (Toggle Plain Text)
  1. #!/bin/bash
  2. echo "Script 1"

f2.sh:
Shell Scripting Syntax (Toggle Plain Text)
  1. #!/bin/bash
  2. echo "Script 2"

f3.sh:
Shell Scripting Syntax (Toggle Plain Text)
  1. #!/bin/bash
  2. echo "Script 3"

Results in:
  1. sk@svn:/tmp/daniweb/s$ ./main.sh
  2. Script 1
  3. Script 2
  4. Script 3
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Shell Scripting Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC