Simple enough request, I suppose. I need to make a shell script (Can be #!/bin/bash or #!/bin/sh as long as the operations get done) to run a .sh script file in several directories using a table. An explanation of what I need to accomplish is to have a table containing for instance 3 server directories; server1, server2 and server3. Now to start those servers, a .sh script is inside those directories titled 'start.sh' which automates starting the server. So, a piece of coding at the bottom of where the table contents is defined needs to do for instance select one of those directory names and start a sh script then continue on with the rest of the servers. How would I go about this?
If you can't understand what I said previously, here is a non-working descriptive code sniplet to better word it.
table=server1,server2,server3 <- All of the server names
for every name in the table do this command
sh $selected table entry/$executable
repeat above command for all table entries
Hope I was descriptive enough.