Vi search and replace
After 20 years of working on UNIX I am just now finding the need to learn more than the basics of VI. (Yes I have been a emacs person for many many years.) Here is how to do a global search and replace in vi.
1,$s/oldstring/newstring/gThe 1 means the first line of the file (obvious) and $ means the last line of the file (less obvious).
0 Comments:
Post a Comment
<< Home