echo
prints all of its arguments. It does not read from stdin
. So the second echo
prints all of its arguments (none) and exits, ignoring the Hello
on stdin
.
For a program that reads its stdin
and prints that to stdout
, use cat
:
$ echo Hello | cat
Hello