Use cat or your text file pager (more or less) to view myfile’s contents; see [Figure 6.3].
You can change the standard input of a command with the input redirection operator, <. For example, cat < myfile will display the contents of myfile. This is not useful in practice; for convenience, the cat command accepts a filename argument. So you can simply say cat myfile, and the effect will be the same. redirection operators
Under the hood, cat < myfile means that the shell opens myfile and then feeds its contents to the standard input of cat. cat myfile, without the redirection operator, means that the cat command receives one argument (myfile) opens the file itself, and then displays the file.
There’s a reason for the double functionality, however. For example, you can connect the standard output of one command to the standard input of another. This is called a pipeline, and it uses the pipe operator[[1]], |.
[1] Depending on your keyboard, this may either appear as a vertical bar or a broken vertical bar, but it can almost always be found above the backslash (\).
Perhaps you want to see the GNU General Public License in reverse. To do this, you use the tac command (it’s cat, only backward). Try it out:
tac /usr/doc/copyright/GPL
Unfortunately, it goes by too quickly to read. So you only get to see a couple of paragraphs. The solution is a pipeline:
tac /usr/doc/copyright/GPL | less
This takes the standard output of tac, which is the GPL in reverse, and sends it to the standard input of less.