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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents