Skip to main content
format
Source Link
don_crissti
  • 85.7k
  • 31
  • 234
  • 262

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 

The --exact attributes proposed in Hauke's answer didn't work on some systems. You can use the -x attribute instead.

#!/bin/bash if pgrep -x "zeal" > /dev/null then echo "Running" else echo "Stopped" fi 

The long option --exact proposed in Hauke's answer didn't work on some systems. You can use the equivalent short option -x instead.

#!/bin/bash if pgrep -x "zeal" > /dev/null then echo "Running" else echo "Stopped" fi 
Source Link
Djidiouf
  • 201
  • 2
  • 6

The --exact attributes proposed in Hauke's answer didn't work on some systems. You can use the -x attribute instead.

#!/bin/bash if pgrep -x "zeal" > /dev/null then echo "Running" else echo "Stopped" fi