1 2 3 4 5 6 7 8
#!/bin/sh COUNT="$(pgrep -U "$(whoami)" -f qpwgraph | wc -l)" echo "$COUNT" if [ "${COUNT:-0}" -eq "0" ]; then exec qpwgraph fi