How to find and replace the below command?
Answers were Sorted based on User's Feedback
Answer / muralidharan
In a vi mode
:%s/searchword/replacaceword/g
| Is This Answer Correct ? | 17 Yes | 0 No |
Answer / pavithra
Using sed command:
sed 's/searchword/replaceword/g' filename --[It finds the
word in file and replaces and displays in the command line]
sed -i '/s/searchword/replaceword/g' filename -- [It edits
the file, finds and replaces the word and saves it and next
time when u open the file it displays the file with replaced
word]
| Is This Answer Correct ? | 8 Yes | 1 No |
How do I search for a file in unix command?
Explain iostat, vmstat and netstat.
How does pipe () work?
Explain ‘system calls’ with respect to unix commands?
Why is shebang used?
Is ‘du’ a command? If so, what is its use?
what are wild cards?
What is the general format of unix command syntax?
How to identify whether a file is normal file or directory?
Write a command to kill the last background job?
What command would users use to see what file one page at a time in UNIX?
Where can I get the free download of Unix by Yeswant Kanetkar?