On Fri, 11 Apr 1997, Jason Costomiris wrote: > On Fri, 11 Apr 1997, Rick wrote: > > > What is it that is so special about vi? Does it decompile programs or write > > them all by itself or leap tall buildings with a single bound? > > I get calls from users all the time asking "How do I search and replace in > my file?" 9 times out of 10, they are using pico, which has to be the > most brain dead editor ever created. I always tell them, use vi, and > then: > > :g/search-regexp/s//replace-string/g > > Voila. Takes about 3 seconds to type it and change every instance of some > expression in an entire file. Could be handy if you suddenly realize that > you've been misspelling some guy's name throughout your 50 page thesis. > > I tell them to use vi, they wretch, much like you seem to be. They ask if > there's something else. I then tell them: > > perl -pi.bak -e 's/search-regexp/replace-string/g' filename > > .... and then they go into convulsions. Then they waste a bazillion years > ftp'ing their file to their Windoze box, make the changes using Notepad, > and then ftp it back in binary mode, thus munging the end of lines, and > then call me again for help, asking why there are all of these funny ^M's > on the end of their lines. Argh.
Tell them to install joe. If they can't figure out how to use joe, give them a pencil (with eraser) and paper. +----------------------------------------------------------------------+ + Paul Wade Greenbush Technologies Corporation + + mailto:[EMAIL PROTECTED] http://www.greenbush.com/ + +----------------------------------------------------------------------+ + http://www.wtop.com/ What does W.T.O.P. mean? + +----------------------------------------------------------------------+