r
R
s
S E. None of the above
Answer is Wrong!
Answer is Right!
The correct answer is: C. s
The s command is used to replace text from the cursor to the right. The syntax for the s command is:
s/old/new/
where old is the text to be replaced and new is the replacement text. For example, to replace the word “hello” with the word “world”, you would type the following command:
s/hello/world/
The s
s command, please see the vi documentation.
The other options are incorrect for the following reasons:
- Option A,
r, is used to insert text at the cursor. - Option B,
R, is used to replace the entire line at the cursor. - Option D,
S, is used to search for a pattern and replace it with another pattern. - Option E, None of the above, is incorrect because one of the options is correct.