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 |
Explain command to show the space allocation of files?
Can you write a command to erase all files in the current directory including all its sub-directories?
What is pid?
Differentiate cmp command from diff command.
How do you grep recursively?
What is the command to find hidden files in the current directory?
What are awk commands?
how to unzip the contents of the gzip file
what is the use of the hidden files?
What command will change your prompt to myprompt?
What is the difference between pipe (|) and tee command in unix
how to make IGNITE-BACKUP in HP-UX?