Quote:
I had the same issue with UDP as you.
Did you solve them?
What you say regarding terminating netcat makes sense, especially since the script functions identically after the while loop is removed.
I have to believe there's is a rather easy solution to this.
Is there no way to store the output of nc in a variable and parse it for linefeed at the same time?
can the output of nc be piped to awk or sed to parse each character and put it in a variable?
#!/bin/bash
nc -l 1234 | awk '{print $1 " =message received" }' ' <-- this works, prints each line, and $1 is always the last string sent and returned, I just don't know where to go from here.