I need to read data sent by UDP. I use nc -ul 50000
. It keeps running even after having received a line. I want to read every line as it arrives.
How can I do that?
An answer to another question on Stackexchange suggested using something like
while read VAR
do
my_command
done < <(nc -ul 50000)
but that doesn't do the trick... doesn't read anything. I am really grateful for any help you can provide cause I really don't know how this could be done.