[H-GEN] Text Search and Replace @ shell prompt

Greg Black gjb at gbch.net
Sun Aug 25 23:26:03 EDT 2002


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Jason Parker-Burlingham wrote:

| Greg Black <gjb at gbch.net> writes:
| 
| > | All I want to do is that searching a string and replace it with a
| > | given string in the content of the file.
| 
| > To give an example answer to the question, which is probably not
| > quite adequate because the task is under-specified,
| 
| There is one clear way in which your solution---and any along the same
| lines---is inadequate:

As I had already stated twice, the solution is impossible to
provide adequately because the task is under-specified.  It's
just a waste of everybody's time to expect general solutions to
under-specified tasks.

The real point I was making was that poor specifications lead to
non-working solutions.  I think it's better to get the problem
specified than to provide all-singing answers that still run a
real risk of not actually doing what's wanted.

The rest of the advice was, of course, sound.  I would probably
have also mentioned the Emacs `query-replace-regexp' function as
a way of doing it by hand that would be fairly painless.

Greg

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list