-3

I have some scripts setup that I would like a master script to call based on a files appearance in a directory. Basically I have what's show below.

Script A uses file a

Script B uses file b

Command C uses file c

I would like to have a master script that looks for file a and if it's there run Script A if not there skip it then proceeds through B and C. All of the files and scripts are to be located within the same directory.

0

1 Answer 1

0

To execute a shell script a.sh if file a.file exists and is a regular file, you can use this construct:

[ -f a.file ] && source a.sh

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.