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 -
ncat automatically terminates tail -f on exit (on Mac OS X 10.6.7)!
ncat
tail -f
# simple log server in Bash using ncat # cf. http://nmap.org/ncat/ touch file.log ncat -l 9977 -c "tail -f file.log" file.log # terminal window 3