What is the difference between the printf function in bash and the echo function?Specifically, running:echo blah >/dev/udp/localhost/8125did not send the blah command to the server listening on 8125, whereasprintf blah >/dev/udp/localhost/8125sent the data. Does printf send an extra EOF at the end of its output?
Difference between printf and echo in bash
bash
The difference is that echo sends a newline at the end of its output. There is no way to send an EOF.