LFCS · Question #865
Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.)
The correct answer is A. < B. <<< C. >. Bash stream redirection operators include < for input, > for output, and <<< for 'here strings', which provide a string as input.
Question
Options
- A<
- B<<<
- C
- D
- E%>
How the community answered
(46 responses)- A87% (40)
- D4% (2)
- E9% (4)
Why each option
Bash stream redirection operators include `<` for input, `>` for output, and `<<<` for 'here strings', which provide a string as input.
The `<` operator is used to redirect standard input for a command from a specified file.
The `<<<` operator, known as a 'here string', takes a string as its argument and feeds that string to the standard input of a command.
The `>` operator is used to redirect standard output of a command to a specified file, overwriting the file if it already exists.
`>>>` is not a standard or valid stream redirection operator in Bash.
`%>` is not a standard or valid stream redirection operator in Bash.
Concept tested: Bash shell redirection operators
Source: https://www.gnu.org/software/bash/manual/bash.html#Redirection
Topics
Community Discussion
No community discussion yet for this question.