I am trying to implement a simple log server in Bash. It should take a file as a parameter and serve it on a port with netcat.
( tail -f $1 & ) | nc -l -
Not an ideal answer, but I found a workaround for a logger daemon I worked on:
#!/bin/sh tail -f /etc/service/rt4/log/main/current --pid=$$ | grep error
from $info tail:
--pid=PID with -f, terminate after process ID, PID dies