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 |
what is the cmd to display the last exit status in UNIX?
How would you change all occurrences of a value using VI?
what is telnet?
Which mode is used for allowing file write,read and append mode?
in a growing log file how will you see the 1st 99 lines?
What are reported commands?
What is the command to check ports active in UNIX?
What is the protocol for PING command?
Will rm -r* removes hidden files?
Give Command that will move a single file called "unix.txt"
what is mount ,tell me about mount ,how can u use in real time project??
How can we "forked" process in UNIX? How then recognize in any of the branches we?