Looking for quick way of editing a text file

cs at zip.com.au cs at zip.com.au
Mon Nov 21 00:32:42 UTC 2005

On 20Nov2005 19:31, gb spam <gbofspam at gmail.com> wrote:
| > 2: You might want bsed:
| >
| >      Page:
| >      http://www.cskk.ezoshosting.com/cs/css/bsed.html
| >
| >      Script:
| >      http://www.cskk.ezoshosting.com/cs/css/bin/bsed
| >
| > Bsed is a wrapper for sed. It takes pretty well the same arguments as sed,
| > but edits files in place. I frequently use it for batch edits; it's very
| > handy. Example:
| >
| >         bsed '4s/that/that/' filename.txt
| >
| > Replace "this" with "that" on line 4. It essentially does all the redirection
| > of the first sed with error handling, temp files and such.
| check out "sed -i"

Only on GNU sed, not standard sed. And probably as busted as "perl -i"
(see other post in thread). Bsed is easier to type anyway, and has a
few other handy benefits like diff reporting.

Cameron Simpson <cs at zip.com.au> DoD#743

The more I know about the WIN32 API the more I dislike it. It is complex and
for the most part poorly designed, inconsistent, and poorly documented.
- David Korn

More information about the users mailing list