Tail
Jump to navigation
Jump to search
tail -F my.log | awk '/line/ {++i;printf "\r%d",i}' tail -Fn0 /var/log/mylog.20201101* | awk '/Connection/ {++i;printf "\r%d",i}'
#!/usr/bin/env bash set -e logfile=my.log match='Finished: SUCCESS' while true; do # tail -F -n 0 $logfile | sed "/^$match$/ q" > /dev/null tail -F -n 0 $logfile | sed "/$match/ q" > /dev/null echo found new instance of $match in $logfile done