How would you change all occurrences of a value using VI?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
How can i know my Filesystem and its current usage in my prod UNIX system?
distinguish between paging and swapping?
What are filter commands in unix?
What is use of sed command?
12 Answers BitWise, Infosys, Reliance,
what is ls -ltd?
What is unix command?
What is ctrl d?
use of ls command
what is the functionality of kernel in unix architecture?
How do you remove a crontab file?
Which unix command lists files/folders in alphabetical order?
What is the use of the command 'ls -x chapter[1-5]' ?