I've been scripting in TCL/Expect and want to query multiple devices in a network.
In order to do this I've written executable shell scripts that do the querying on 1 device.
What I now need is a main script that receives as input a list of devices to query and then starts executing the already written scripts in parallel. When a script ends. Another instance of the script should start, keeping the running scripts at 10 until there are not enough devices anymore.
I've been doing some research and found that there are 3 possible ways to go:
Forking
Events
Threads
I now wonder what would be the best direction to go and where I can find some tutorial on it, as the sites I googled didn't have any handy examples to implement this.