#!/bin/bash
tail -f /home/chaoyuan/shell_script/monitor_log/1.log | while read line
do
echo $line |grep "Server started" > /dev/null
if [ $? -eq 1 ]; then
continue
else
echo -e "\033[32m server start successful \033[0m"
exit 0
fi
done
#!/bin/bash
tail -f /home/chaoyuan/shell_script/monitor_log/1.log | while read line
do
echo $line |grep "Server started" > /dev/null
if [ $? -eq 1 ]; then
continue
else
echo -e "\033[32m server start successful \033[0m"
exit 0
fi
done