How can a Linux user use vi to edit the first 30 lines of a 60-line file and replace all occurrences of test to TEST?

How can a Linux user use vi to edit the first 30 lines of a 60-line file and replace all occurrences of test to TEST?

How can a Linux user use vi to edit the first 30 lines of a 60-line file and replace all occurrences of test to TEST?

A.
:30s/test/TEST/g

B.
:1,30s/test/TEST/g

C.
:s/test/TEST/g

D.
:/s/test/TEST/g



Leave a Reply 1

Your email address will not be published. Required fields are marked *


mr_tienvu

mr_tienvu

Correct answer is B