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 |
who to change the duplex setting of network interface in command line
What are grep patterns?
Write a command to kill the last background job?
What UNIX command will control the default file permissions when files are created?
Where LOG fiels resides in AIX and pls tel me how to remove the log file
what is the command to get help on a UNIX terminal?
What is the command to find hidden files in the current directory?
How to check whether some services are running in another server or not? Suppose i am currently in a server named A.I want to check whether some services are running in server B without logging into the server B.
3 Answers Amazon, MBA, Syntel, TCS, Unisys,
Which command is used to restrict incoming messages?
How do you create a directory in UNIX?
How do you grep a case insensitive?
What do chmod command do?