This is basically my code:
bay=$(prog -some flags) while [ $bay = "Another instance of this program is running, please exit it first" ] do echo "Awaiting Access to program" do .....
I have a program that will allow only one instance to start at a time due to the way it interacts with my equipment, when another instance starts it, it displays the following message "Another instance of this program is running, please exit first."
I need to execute several scripts that will use the same program, so I decided to use the code above. My problem is that when I run my two scripts, you get access to the program and execute as you wish, and the other will notice an error and then get stuck in the infinate loop, echoing "Waiting for access to the program."
Have you missed something? Is the Statement an execution of the CLI command, or is it just returning to its original execution? Or where else is my problem?
source share