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 |
Enumerate some of the most commonly used network commands in unix?
What is the difference between AWK and SED commands? Plz give example and explain...
How to find the files that are accessed before 10 minutes?
What is a bash command?
in UNIX,what is the command to remove directory with files?
what is the command to get help on a UNIX terminal?
what does a process mean?
How do I search a whole word in vim?
Explain how to use grep command to list find the records of a file containing 10 different strings?
What command is used to replace the existing string with some other?
How do I run a whois command?
What is file system in unix??