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 to get a particular string as your prompt ? Give syntax of that command?
use of ls command
what is difference between unix and linux?
distinguish between paging and swapping?
How do you change your account's password?
Enumerate some of the most commonly used network commands in unix?
can we use cat command as an editor ..???
What is FIND, GREP and SED ? Could you please give me the difference between all the three? Where we use this commnands?
What is the use of touch command in there?
What is the use of finger command?
what do you understand by 'unix is a portable os'?
why unix commands can be divided into internal and external commands?