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

Recommended Answers

All 3 Replies

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.

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

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.