Reputation: 723
I have this bash script
# a.sh
name="Hello"
echo $name
How can I execute multiple times a.sh
asynchronously?
Upvotes: 1
Views: 1252
Reputation: 180181
You can use a Bash range expansion and for
loop to conveniently express the multiplicity, and the &
operator to put the script executions in the background:
for x in {1..8}; do
bash /path/to/a.sh &
done
Upvotes: 2