Use command
tail -f file.log | grep --line-buffered "my pattern" | while read line
do
echo $line
done
The --line-buffered is the key here, otherwise the read will fail.
tail -f file.log | grep --line-buffered "my pattern" | while read line
do
echo $line
done
The --line-buffered is the key here, otherwise the read will fail.Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment