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 awk used for?
What is the significance of the 'tee' command?
Which RAID Levels supported by LVM?
What is the unix command to confirm a remote host is alive or not?
A file has 1000 lines and i want to display only 1st line how to do it? pls ..tel me
Which Command is Used for temprary switch User?
How does one process we can start an executable file? How to get the PID process, which we started?
their is a file1,file2 and i want to append file1 data to file2?
Assume the following files are in the working directory prompt> ls -l tasks -rw-r--r-- 1 alex student 1423 Feb 21 14:01 tasks What command can Alex use to give everyone permission to write to the file? What will the ls -l command display if he does so?
Explain ‘system calls’ with respect to unix commands?
what is shell?
What is $0 bash?