Chapter 3. Shell Prompt Basics
35
Figure 3-8. Stringing Commands and Comparing Files
3.8.3. Redirecting Standard Input
Not only can you redirect standard output, you can perform the same type of redirection with standard
input.
When you use the redirect standard input symbol
, you are telling the shell that you want a file to be
read as input for a command.
Use a file you have already created to demonstrate this idea. Type:
cat
sneakers.txt
Because you used the less-than symbol (
) to separate the
command from the file, the output of
cat
was read by
.
sneakers.txt
cat
Figure 3-9. Redirecting Standard Input