GNU bug report logs - #13028
inplace: new program

Previous Next

Package: coreutils;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Thu, 29 Nov 2012 15:24:01 UTC

Severity: wishlist

Full log


Message #11 received at 13028 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 13028 <at> debbugs.gnu.org, "David A. Wheeler" <dwheeler <at> dwheeler.com>
Subject: Re: bug#13028: inplace
Date: Thu, 29 Nov 2012 15:35:09 +0000
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 'ul[@class=\"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.




This bug report was last modified 2 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.