Netcat UDP command not working? From one Terminal:

echo "test" | nc -u -l 127.0.0.1 10000


From another Terminal:

nc -u 127.0.0.1 10000


But the Terminal just hangs, it doesnt return the "test" output. It seems to work fine without the -u argument. What am I getting wrong here?
You seem to have accidentially reversed which one is the listener and which one is not. I.e. you'll need to change the commands to the following:

Open the listener first:

nc -u -l 127.0.0.1 10000


Then the sender:

echo "test" | nc -u 127.0.0.1 10000


Then you'll see that the listener outputs "test" on the console.

You can stop the nc program by pressing Ctrl-c.