In the second example, cat < /etc/passwd |./a.out
Is it possible to use the symbol <?
As far as I understand it, is pipeline symbol passing the output of a command as a standard input to another command? So I think the < here is redundant. I don’t know if the analysis is correct.
The < here can not be written, they perform the same results, and the process is different.
cat /etc/passwd To pass /etc/passwd as a parameter to cat
cat < /etc/passwd First, the file is opened by shell, then the standard input of cat is redirected to the file descriptor.