Re: Looking for quick way of editing a text file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 21, 2005 at 11:06:02AM +1100, Cameron Simpson wrote:
> 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.

Note that perl can do a similar edit-in-place, eg

    perl -ipe 's/this/that/' *.txt

-- 
O Unicef Clearasil!
Gibberish and Drivel!
                      - "Bored of the Rings"


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux