echo usually provides the -n flag. This is not a standard.
string A string to be written to standard output. If the first operand is -n or if any of the operands contains a backslash ('\') char - acter, the results are determined by the implementation.
On XSI-compatible systems, if the first operand is -n, it should be treated as a string, not an option.
I would suggest using printf
printf "A 192.168.192.168" | nc -u 192.168.2.1 1234
printf does not add a new line unless it is said, and this is standard behavior.
c00kiemon5ter
source share