0

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

3
Contributors
3
Replies
6
Views
7 Years
Discussion Span
Last Post by sknake
1

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.

Edited by Aia: n/a

0

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

0

Main script (main.sh):

#!/bin/bash
/tmp/daniweb/s/f1.sh
/tmp/daniweb/s/f2.sh
/tmp/daniweb/s/f3.sh

f1.sh:

#!/bin/bash
echo "Script 1"

f2.sh:

#!/bin/bash
echo "Script 2"

f3.sh:

#!/bin/bash
echo "Script 3"

Results in:

sk@svn:/tmp/daniweb/s$ ./main.sh
Script 1
Script 2
Script 3
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.