Linux Foundation LFCS Exam - Topic 2 Question 115 Discussion
When running the commandsed -e "s/a/b/" /tmp/file >/tmp/fileWhile /tmp/file contains data, why is /tmp/file empty afterwards?
C) When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading.
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.
D) Redirection for shell commands do not work using the > character. It only works using the | character instead.
Cathern
11 days agoCharlette
17 days agoBronwyn
22 days agoRory
27 days agoEarnestine
1 month agoEvangelina
1 month agoRosio
1 month agoBernadine
2 months agoLenna
2 months agoDonette
2 months agoIdella
2 months agoNa
2 months agoArt
2 months agoTamala
3 months agoOzell
3 months ago