Calling multiple scripts

Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
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
Nov 10th, 2009
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,048
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: 178
Aia's Avatar
Aia Aia is offline Offline
Postaholic
 
1
  #2
Nov 11th, 2009
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; Nov 11th, 2009 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
Nov 11th, 2009
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,410
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: 614
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #4
Nov 12th, 2009
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



Tag cloud for Shell Scripting
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC