LPI
101-400 · Question #23
Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?
The correct answer is D. sed 's/bob/Bob/g' letter > newletter. See the full explanation below for the reasoning.
Question
Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?
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
(50 responses)- A2% (1)
- B16% (8)
- C8% (4)
- D72% (36)
- E2% (1)
Community Discussion
No community discussion yet for this question.