At work today I needed this command to test UDP traffic to a particular endpoint, and thought I'd leave it written down here!
This netcat command sends a single UDP packet with the string "foo" to a particular IPv4 address on a particular UDP port:
|