pgrep emacs >/dev/null if [ $? -eq 1 ] then echo 'X' else echo 'e+' fi