| Liam Delahunty: Home | Tips | Web | Contact | 
|---|
| 
Recommended laptop under £500. Think I deserve a present? See my Amazon Wish List | Linux. Vi / Vim string substitutionIn command mode. :1,$s/Section/Chapter/g replaces every occurrence of the string "Section" with the string "Chapter" from line 1 in the file through the buffer ($) - use . for to current line. The "/g" indicates that "Section" should be replaced by "Chapter" every time on a line get rid of all links on a page. 
:%s/<a.*">//gInsert Carrage return at end of each paragragh: 
 (^M is CTL-V followed by Carrage return (CR)) Convert Mac documents to Unix :%s/^M/^M/gStrip all HTML from a document :s/<[^>]*>//gRemove blank lines :g/^$/d Share this! |