bug-coreutils
[Top][All Lists]
Advanced

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

bug#13028: inplace


From: Pádraig Brady
Subject: bug#13028: inplace
Date: Thu, 29 Nov 2012 15:36:48 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 11/29/2012 03:32 PM, Ruediger Meier wrote:
On Thursday 29 November 2012, Reuben Thomas wrote:
On Fri, 14 May 2004 15:53:04 +0600 (YEKST), Victor Porton offered his
handy "inplace" script to coreutils, which runs a filter on a file
in-place. A couple of replies said there was no need for this as one
could do in-place editing with perl or sed, but I think that was
misguided, as the point of inplace is that it works with any filter.
I just used it with xml_grep:

inplace "xml_grep --exclude 'address@hidden"toc\"]' \"\$IN\" >
\"\$OUT\"" "$book.xhtml"

I attach an updated version of inplace with some bashisms and typos
fixed.

You may also have a look at sponge from moreutils project
http://linux.die.net/man/1/sponge
http://joeyh.name/code/moreutils/

sponge is good, but doesn't quite cut it.
See point 6 at: http://www.pixelbeat.org/docs/unix_file_replacement.html

thanks,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]