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.
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 it for reading.
D) Redirection for shell commands do not work using the > character. It only works using the | character instead.
Correct Answer:
Verified
Q50: Which character, added to the end of
Q51: What happens after issuing the command vi
Q52: Which of the following commands can be
Q53: Which of the following commands changes the
Q54: Regarding the command: nice -5 / usr
Q56: Which of the following commands changes the
Q57: When starting a program with the nice
Q58: Which of the following are valid stream
Q59: When given the following command line. echo
Q60: Which type of filesystem is created by
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents