Полезная информация

Next Up Previous Contents Index
Redirecting Standard Input

2.9 Redirecting Standard Input

Not only can you redirect standard output, you can perform the same type of redirection with standard input.

Here's how it works:

When you use the redirect standard input symbol <, you're telling the shell that you want a file to be read as input for a command.

We can use a file we've already created to demonstrate this idea. Just type:

cat < sneakers.txt

Because we used the less-than symbol (<) to separate the cat command from the file, the output of sneakers.txt was read by cat.

Next Up Previous Contents Index