echo prints its argument followed by a newline. With multiple arguments, they are separated by spaces. Depending on the unix variant, the shell and the shell options, it may also interpret some escape sequences beginning with \, and it may treat the first argument(s) as options if they start with -.
printf interprets its first argument as a format, and subsequent arguments as arguments to the % specifiers. No newline is added unless you specify one. In the first argument, all characters except two are interpreted literally: % starts a printf specifier, and \ starts an escape sequence (e.g. \n for a newline character).
Because different shells work differently, echo "$string" does not always print the specified string plus a newline. A reliable way of printing a string is printf %s "$string". If you want a newline after the string, write printf '%s\n' "$string".
In your case, assuming that blah doesn't start with a - or contain % or \, the only difference between the two commands is that echo adds a newline and printf doesn't.
echo "blah"andprintf "blah"isechowill output an extra newline. Does that matter to the server? Does the order when receiving several commands in a row matter? EOF is not something you send or even a character - it's a condition you receive when there is nothing left to read. – jw013 Dec 12 '12 at 19:11loand not rely on the server printing stuff. There is always iptables ... – user1129682 Dec 12 '12 at 21:44