I was wondering about differences and relation between redirection and pipeline.
- Is pipeline only used to connect stdout output of a command to stdin input of another command?
- Is redirection only used to connect
a stdout output of a command to a
file, and to connect a file to a
stdin input of a command? But there
seems to be
command >& 2.
- A pipeline
com1 | com2can be replaced by redirection as
com1 > tempfile; com2 < tempfile. Can the replacement be modified to be without using a file?
- Can a redirection be replaced by a pipeline?
Thanks and regards!