Redirecting STDIN
suggest change< redirects the file on its right to the standard input of the command on its left.
To feed a file to stdin, read /tmp/a_file with <, which is the same as 0</tmp/a_file.
Note: when no descriptor is written, < defaults to 0 (stdin).
$ echo "b" > /tmp/list.txt
$ echo "a" >> /tmp/list.txt
$ echo "c" >> /tmp/list.txt
$ sort < /tmp/list.txt
a
b
c
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents