LPIC-1 Exam 101 v5 (Linux Administrator) — Question 26
Which of the following commands outputs test to the shell?
Answer options
- A. catEOT<brtest EOT -
- B. cat <|EOT test EOT -
- C. cat !test EOT -
- D. cat &test EOT -
- E. cat <test EOT -
Correct answer: E
Explanation
The correct answer is E because it uses the input redirection operator '<' to read from a file named 'test' and output its content to the shell. The other options are invalid syntax or do not correctly redirect input, thus they will not output 'test' as expected.