I'm seeing one interesting behaviour with some commands which need manual interruption when piped with echo -n command.
bash-3.2$ openssl
OpenSSL> exit
bash-3.2$ echo -n | openssl
OpenSSL> bash-3.2$
bash-3.2$ telnet 10.207.139.8 22
Trying 10.207.139.8...
Connected to 10.207.139.8.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.4
^]
telnet> Connection closed.
bash-3.2$ echo -n | telnet 10.207.139.8 22
Trying 10.207.139.8...
Connected to 10.207.139.8.
Escape character is '^]'.
Connection closed by foreign host.
bash-3.2$
When used with echo -n it will not prompt for user input. What is happening behind the scene?
The man page of echo command says this
-n Do not print the trailing newline character. This may also be achieved by appending `\c' to the end of the string, as is done by iBCS2
compatible systems. Note that this option as well as the effect of `\c' are implementation-defined in IEEE Std 1003.1-2001 (``POSIX.1'')
as amended by Cor. 1-2002. Applications aiming for maximum portability are strongly encouraged to use printf(1) to suppress the newline
character.