GNU bug report logs - #32069
Man page description is wrong for -i

Previous Next

Package: sed;

Reported by: Matthew Jenkins <mjenki03 <at> gmail.com>

Date: Fri, 6 Jul 2018 00:54:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Matthew Jenkins <mjenki03 <at> gmail.com>
Cc: 32069 <at> debbugs.gnu.org
Subject: Re: bug#32069: Man page description is wrong for -i
Date: Fri, 6 Jul 2018 15:43:01 -0600
Hello,

On 06/07/18 02:54 PM, Matthew Jenkins wrote:
> I'm not asking to change the behavior of sed. I'm asking to have the
> man page reflect what sed -i actually does to at least be less wrong
> so it's less of a gotcha.
> 
> Examples of gotchas:
> sed -i on a large file when you only have less than that amount of
> space available.
> sed -i on a hard link

when out of disk space, 'sed -i' behaves in a very reasonable and safe way:
it will fail to create the temporary file, and leave the original file 
unmodified.

As for 'sed -i' on hard-link:
"sed -i" has never maintained hard-links with "--in-place",
and neither does any other common unix utility - so it is not clear
where this expectation originates from.


> I'm sure there are more but these gotchas wouldn't be gotchas anymore
> with a better description.

"sed -i" certainly has some gotchas, and few are documented in the manual:
https://www.gnu.org/software/sed/manual/sed.html#index-_002df

It seems the "in-place" related topics are growing, perhaps it is
warranted to dedicated a separate section in the manual.

If you'd like to try and add such a section - please do send a patch.

Otherwise, I will try to add something like that at a later time.

regards,
 - assaf







This bug report was last modified 7 years and 34 days ago.

Previous Next


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