How would you change all occurrences of a value using VI?

Answer Posted / sameer

press esc+shift
then when the VI takes u to the edit mode use the following.

:1,$s/pattern to be changed/new value/g

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between grep and find command in unix?

584


Which command is used to create a directory?

577


What is rmdir command?

557


What is the function of grep command in unix?

595


What is the command to compare two files in unix?

628






What is the search command in unix?

609


Explain how to use grep command to list find the records of a file containing 10 different strings?

600


Explain ‘library functions’ with respect to unix commands?

606


What do chmod, chown, chgrp commands do?

644


What is a command and examples?

593


What is the use of the command 'ls -x chapter[1-5]' ?

665


What is the use of sed command in unix?

604


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

629


How to find $ai_serual resolved path by using unix

1033


What are reported commands?

570