I have netcat working between a debian system and mac osx, but I can't get debian system to send updates of a log file to the mac which is listening with:
nc -k -l 8888
But regardless of what I tried on the sending side with tail -f mylogfile | netcat machostip 8888 or watch tail -f etc nothing gets through to the other side. Each time logfile updates I'd like the data visible on the mac side...
Again I've tried many different ways of piping or redirect < using netcat but haven't managed to have it working. It does work fine if I do simple echo a command but doesn't work with tail -f watching a logfile...
nc -k -l 8888
tail -f mylogfile | netcat macip 8888
expect logfile updates piped over netcat to the mac.
Based on @CharlesDuffy input/response, I have verified he is correct and that it works, except that I was using tail -f mylogfile | grep "only this stuff" | netcat macip 8888
.
So question now is can I somehow filter the tail -f output before piping2netcat?