in reply to Re^2: One liner to test existance of a file
in thread One liner to test existance of a file

That command does not output that at all. -n prevents echo from outputting a newline. As for the prompt, it comes from the shell. Don't run a shell interactively, hide its prompt, waitfor it, or exec a shell to execute the command, causing the connection to drop after the output has been obtained.