📅  最后修改于: 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