brothertom
asked on
Bash script to check a process output, then do something
Hi,
Looking for a script to do the following - start the program is its status is not running.
The program returns the string 'not running' if not running, else some other text :
status = /home/user/program getstatus
if (status == 'not running') {
/home/user/program start
} else {
// do nothing
}
Can someone help out please.
Thanks
BT
Looking for a script to do the following - start the program is its status is not running.
The program returns the string 'not running' if not running, else some other text :
status = /home/user/program getstatus
if (status == 'not running') {
/home/user/program start
} else {
// do nothing
}
Can someone help out please.
Thanks
BT
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks - worked nicely :)
Open in new window