Hi Team,
I am using redhat 6.4 version server.We have a script which is used to check the process and sends email if the process is not running.If it is running it will continue and do some other operation.
I didnot understand below option -z in the if condition.I have tried to search in the net for the same but didnot get any related explanation on this.
if [[ -z `ps -ef | grep /usr/sbin/sshd` ]];then
echo;echo "The ssd is not running; exiting."
exit
fi
My intention here is if the process is not running it should exit from the script and should send an email to the distribution list.It should not continue and do the next tasks if the process is not running.
thanks for your replies.
Regards,
Murali