3 stdbuf
-oL tail -n 0 -v -F /var
/run
/xinetd.dump |\
6 while IFS
='' read -r line
8 if [[ $line =~ ^
==\
> ]]
10 # tail opened the file, it's time to ask xinetd to dump
11 pkill
-USR1 -F /var
/run
/xinetd.pid
13 if [[ $line =~ ^INTERNAL\ STATE\ DUMP
]]
21 if [[ $line =~ ^END\ OF\ DUMP
]]
28 # we got enough data, terminate tail