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 -
how about this:
jobs -x echo %1
%1 is for first job in chain, %2 for second, etc. jobs -x replaces job specifier with PID.
%1
%2
jobs -x