Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / sridhar

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

:%s/pattern/new value/g

Is This Answer Correct ?    13 Yes 0 No

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

Answer / 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

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

Answer / dinesh

:%s/pattern/new value/g

Is This Answer Correct ?    6 Yes 0 No

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

Answer / chitra

One should be in command mode for doing this.(i.e press esc)
:%s/oldpattern/newpattern and press enter

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More Unix Commands Interview Questions

Explain mount and unmount command.

0 Answers  


How i'll delete a particular line from the file? Please give answer as soon as possible. Thanks in advance.

12 Answers   IBM,


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

0 Answers  


What is pipe command in unix?

0 Answers  


How to copy multiple files and directories into some other directory?

4 Answers  


How do you copy a directory with many files and folders into another directory?

2 Answers  


what does a process mean?

7 Answers   Infosys,


how to find the 51th record of a file containing 100 records in unix.

12 Answers   IBM,


What command is used to switching between users in unix?

0 Answers  


Explain iostat, vmstat and netstat.

3 Answers   CTS, Wipro,


Why is shebang used?

0 Answers  


What does mkdir up2date; touch outdated up2date do?

2 Answers  


Categories