Send UDP network messages on the command line with the free Swiss File Knife for Windows, Mac OS X and Linux.

sfk udpsend host port [options] data [data2] [...]

   send a UDP message, and optionally receive replies.

   options:
      -listen        wait for a single reply, and dump it.
      -listen=n      wait for so many replies and dump them.
      -listenall     receive endless.
      -timeout=n     wait up to n msec for replies.
      -wide, -lean   etc. change hex dump output format.
                     for details, type "sfk hexdump"
      -flat          print messages as plain text.

   input data format:
      0x123456       a hex string which is converted to binary
      foo            any other plain text is sent as is, but
                     zero termination is NOT done automatically.

      all given data fragments are joined into one large block.
      how long the block can be is system dependent, but it must
      always stay below 2000 bytes.

   examples
      sfk udpsend localhost 12345 -listen hello 0x00
         send "hello" followed by a zero byte to localhost
         on port 12345, then receive a single reply.

 
.