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 |
Why we are using UNIX OS when we are doing the testing in our application?
in a growing log file how will you see the 1st 99 lines?
What does the command '$ls | wc –l > file1' do?
What is merge command in unix?
what is the significance of "su" command?
How to display a file name which has zero bytes in size.
What command is used to switching between users in unix?
When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include<stdlib.h> # include <stdio.h> int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:
Give Command that will change the name of a directly from paypal to eBay
Write a command to kill the last background job?
what is the difference between npar and vpar in HP-UX?
Can you explain a little bit about command substitution?