#!/bin/bash ssh=`/etc/init.d/sshd status | grep status | awk '{print $3}'` if [ $ssh = started ]; then # echo "\${color green}started\$color" echo "started" else # echo "\${color red}stopped\$color" echo "stopped" fi