ExamGecko
Question list
Search
Search

Question 103 - 101-500 discussion

Report
Export

When running the command sed -e "s/a/b/" /tmp/file >/tmp/file While /tmp/file contains data, why is /tmp/file empty afterwards?

A.
The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
Answers
A.
The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
B.
The command sed did not match anything in that file therefore the output is empty.
Answers
B.
The command sed did not match anything in that file therefore the output is empty.
C.
When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens itfor reading.
Answers
C.
When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens itfor reading.
D.
Redirection for shell commands do not work using the > character. It only works using the | character instead.
Answers
D.
Redirection for shell commands do not work using the > character. It only works using the | character instead.
Suggested answer: C
asked 18/09/2024
Martin White
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first