!/bin/bash mcrcon_path="/usr/lib/nagios/plugins/mcrcon" mcrcon_host="SNIP" mcrcon_port="SNIP" mcrcon_password="SNIP" mcrcon=`$mcrcon_path -c -H $mcrcon_host -P $mcrcon_port -p $mcrcon_password players | awk '{ print $3 }'` players=`echo $mcrcon | awk -F "/" ' {print $1} '` slots=`echo $mcrcon | awk -F "/" ' {print $2} '` echo "Players: $players / $slots | players=$players;;;0;$slots"