nerdexam
LPI

101-400 · Question #360

Which of the following commands will replace every instance of the word list with LIST from the file myfile.txt and print the results on the screen?

The correct answer is B. sed -e "s/list/LIST/" myfile.txt. See the full explanation below for the reasoning.

Question

Which of the following commands will replace every instance of the word list with LIST from the file myfile.txt and print the results on the screen?

Options

  • Ased --in-place -e "s/list/LIST/" myfile.txt
  • Bsed -e "s/list/LIST/" myfile.txt
  • Csed --in-place -e "/list/LIST/" myfile.txt
  • Dsed -e "/list/LIST/" myfile.txt

How the community answered

(43 responses)
  • A
    2% (1)
  • B
    86% (37)
  • C
    7% (3)
  • D
    5% (2)

Community Discussion

No community discussion yet for this question.

Full 101-400 Practice