Is it correct to say that the only difference between the 'input redirection operator' and the 'pipeline operator', is that '<' redirects standard input from a file, and '|' redirects input TO a program?
1 Answer
Both set the standard input to a command. The difference is that the pipe operator connects one command's standard output to another command's standard input, and the file redirection operator connects a file to a command's standard input.
There is also the use of an anonymous pipe to connect the programs when using the pipe operator, which is not required when redirecting from a file. Another thing to bear in mind is that the pipe operator creates a subshell, whereas IO redirection does not.