nerdexam
CompTIA

LX0-101 · Question #21

You have created a really long letter and after you are done you notice that you used the name "Bob" many times but you forgot to capitalize it in many instances. Which command would replace "bob"…

The correct answer is D. sed 's/bob/Bob/g' letter > newletter. See the full explanation below for the reasoning.

Question

You have created a really long letter and after you are done you notice that you used the name "Bob" many times but you forgot to capitalize it in many instances. Which command would replace "bob" with "Bob" in all instances and generate a new letter for printing?

Options

  • Ased '/bob/Bob' letter >newletter
  • Bsed s/bob/Bob/letter < newletter
  • Csed 's/bob/Bob' letter > newletter
  • Dsed 's/bob/Bob/g' letter > newletter
  • Esed 's/bob. Bob/' letter > newletter

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    10% (3)
  • D
    76% (22)
  • E
    3% (1)

Community Discussion

No community discussion yet for this question.

Full LX0-101 Practice