title: Send and receive UDP Messages simultaneously
body: <p>Can UDP messages be sent and received in the same bash script using netcat?</p>
  
  <p>In Linux I want to send a UDP message and receive its output in a variable for further processing. Ideally I want to do this in bash using netcat but I'm open to other possibilities (Java should be easy but I dont want to install additional components if I can avoid it)</p>
  
  <p>So far I can issue the command <code>echo -ne 'some data' | nc -u 192.168.0.xyz 9760</code> and see the incoming signals by setting up a listener <code>nc -ul 9761</code> in another window. But the question is how can this be done in one process, and have the output assigned to a variable?</p>
  
  <p>Could the listener process be sent to the background at the start of a script? if so how is this destroyed when the process finishes?</p>