nerdexam
LPI

101-500 · Question #423

Which of the following commands changes all occurrences of the word "bob" in file data to "Bob" and prints the result to standard output?

The correct answer is B. sed`s/bob/Bob/g' data. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

GNU and Unix Commands

Question

Which of the following commands changes all occurrences of the word "bob" in file data to "Bob" and prints the result to standard output?

Options

  • Ased`/bob/Bob' data
  • Bsed`s/bob/Bob/g' data
  • Csed`s/bob/Bob/' data
  • Dsed`/bob/Bob/' data
  • Esed`s/bob,Bob/' data

How the community answered

(27 responses)
  • B
    93% (25)
  • D
    4% (1)
  • E
    4% (1)

Explanation

You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

Topics

#sed substitution#text filtering#global flag#stream editor

Community Discussion

No community discussion yet for this question.

Full 101-500 Practice