#!/bin/bash mpd_running=$(ps ax |grep "bin/mpd" |grep -v "grep") echo -n "mpd status: " if [ -n "$mpd_running" ]; then echo "on" else echo "off" fi