So wird mir das echo vor dem break noch ausgegeben:
Code: Alles auswählen
#!/bin/bash
set -e && set +x;
#service watchinsect stop;
#/etc/init.d/x_master stop;
#exit;
#echo "---------------------------- PROCMSG:";
while [ true ]; do
#echo "---------------------------- PROCMSG:";
#echo "c";
PROCMSG="eeee";
#PROCMSG=$(ps -aux | grep ./x_master | grep -v grep);
echo "---------------------------- PROCMSG: ";
break;
if [ PROCMSG == "" ] ;
then
break;
fi;
echo "Try to stop x_master process...";
sleep 1;
done;
So hingegeben nicht:
Code: Alles auswählen
#!/bin/bash
set -e && set +x;
#service watchinsect stop;
#/etc/init.d/x_master stop;
#exit;
#echo "---------------------------- PROCMSG:";
while [ true ]; do
#echo "---------------------------- PROCMSG:";
#echo "c";
#PROCMSG="eeee";
PROCMSG=$(ps -aux | grep ./x_master | grep -v grep);
echo "---------------------------- PROCMSG: ";
break;
if [ PROCMSG == "" ] ;
then
break;
fi;
echo "Try to stop x_master process...";
sleep 1;
done;