About Red Hat Partner Programmes Training Support and Docs Products and Services
  downloadstorecart
red hat logo search    
redhat.comredhat network
Red Hat Documentation

Redirecting Standard Input

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.

 

 
 
© 2001 Red Hat, Inc. All rights reserved.       About Red Hat   :   Legal statement   :   Privacy statement   :   Y2K statement   :   Contact Red Hat