View Single Post
Posts: 17 | Thanked: 4 times | Joined on Mar 2010 @ Germany
#17
If you only want to check, whether it is running or not, you could do

if `echo $my | grep -q RUNNING`

Note: no "test" or [...]. grep -q is "quiet" and gives a return value for "found" or "not found"