📌  相关文章
📜  监视字符串的日志文件 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:36.186000             🧑  作者: Mango

代码示例1
tail -fn0 logfile | \
while read line ; do
        echo "$line" | grep "pattern"
        if [ $? = 0 ]
        then
                ... do something ...
        fi
done