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:35:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 11/29/2012 03:20 PM, 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.


I definitely think this is worthwhile.
In fact I mostly finished such a script here
that would handle all the atomic, backup, permissions, etc.:
http://lists.gnu.org/archive/html/bug-coreutils/2010-03/msg00213.html
See also: http://www.pixelbeat.org/docs/unix_file_replacement.html

Where to put such a script is an issue.
We were thinking of a contrib/ folder for higher level
scripts like this that could leverage coreutils/
Translations in the shell script was one thing that was
I was wondering about, which I need to look at.

Also I was wondering what to call it. rp, inplace, replace, ...
and in the meantime I noticed David Wheeler proposed much the same thing
with the "rewrite" util:
http://permalink.gmane.org/gmane.comp.standards.posix.austin.general/5348

rewrite is my favorite name so far.

I'll work on this script after I finish a pending
SELinux patchset I'm working on.

thanks,
Pádraig.





reply via email to

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