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 command to show the space allocation of files?

0 Answers  


Can you write a command to erase all files in the current directory including all its sub-directories?

1 Answers  


What is pid?

4 Answers  


Differentiate cmp command from diff command.

0 Answers  


How do you grep recursively?

0 Answers  


What is the command to find hidden files in the current directory?

0 Answers  


What are awk commands?

0 Answers  


how to unzip the contents of the gzip file

1 Answers   Epsilon,


what is the use of the hidden files?

3 Answers  


What command will change your prompt to myprompt?

0 Answers  


What is the difference between pipe (|) and tee command in unix

14 Answers   Cap Gemini, TCS,


how to make IGNITE-BACKUP in HP-UX?

4 Answers   HP,


Categories