New Year Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmasmnth

When running the commandsed -e "s/a/b/" /tmp/file >/tmp/fileWhile /tmp/file contains data, why is /tmp/file empty...

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.

LPI 101-500 Summary

  • Vendor: LPI
  • Product: 101-500
  • Update on: Dec 18, 2025
  • Questions: 293
Price: $52.5  $149.99
Buy Now 101-500 PDF + Testing Engine Pack

Payments We Accept

Your purchase with ExamsVCE is safe and fast. Your products will be available for immediate download after your payment has been received.
The ExamsVCE website is protected by 256-bit SSL from McAfee, the leader in online security.

examsvce payment method