The long option --exact attributes--exact proposed in Hauke's answer didn't work on some systems. You can use the equivalent short option -x attribute-x instead.
#!/bin/bash if pgrep -x "zeal" > /dev/null then echo "Running" else echo "Stopped" fi