In Linux shell redirection, which symbol is used for input redirection?

Prepare for the Tanium Technical Account Manager Interview Test with multiple choice questions and detailed explanations. Enhance your understanding and get ready to excel in your interview!

Multiple Choice

In Linux shell redirection, which symbol is used for input redirection?

Explanation:
The less-than sign is used for input redirection. It tells the shell to take the command’s standard input from a file instead of waiting for you to type input from the keyboard. For example, grep 'pattern' < file.txt runs grep reading from file.txt as if you had typed its contents on the keyboard. Other redirection forms serve different purposes: the pipe symbol connects a command’s output directly to another command’s input, here-documents with << supply a block of text as input, and 2> redirects the standard error stream rather than standard input.

The less-than sign is used for input redirection. It tells the shell to take the command’s standard input from a file instead of waiting for you to type input from the keyboard. For example, grep 'pattern' < file.txt runs grep reading from file.txt as if you had typed its contents on the keyboard.

Other redirection forms serve different purposes: the pipe symbol connects a command’s output directly to another command’s input, here-documents with << supply a block of text as input, and 2> redirects the standard error stream rather than standard input.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy