Saikiran
Saikiran

Reputation: 191

Multiple bash scripts to execute at a time in a single command

I have three bash scripts which will give output with options.

./script_1 list ./script_2 list ./script_3 list ./script_9 list

and these numbers differs with servers but the first word in every server is "script".

now I want to run all these scripts together with same option 'list'. I need something like ./script_* list ?? or a command with ls or awk or anything else..

Running the process in background is not fulfilling my solution as I appended it into another script.

Upvotes: 0

Views: 143

Answers (1)

jeremysprofile
jeremysprofile

Reputation: 11425

for i in ./script_*; do
    $i list
done

If this is not the use case you're seeking, you'll have to be more specific in your question.

Upvotes: 2

Related Questions