[sorry, the previous mail was apparently truncated by a bug of my MUA.]

I'd suggest treating this bug as a documentation bug. sed's man page claims:
/-----------
       -i[SUFFIX], --in-place[=SUFFIX]

              edit files in place (makes backup if extension supplied)
\-----------

What sed apparently does instead is something like redirecting its
output to a temporary file and then moving that temporary file to the
original file name. This leads to the reported behaviour of symlinks
replaced by file and ACLs changed. I think this should at least be
documented in the man pages.

As already pointed out, perl -i has a similar behaviour. Perl's man page
(man perlrun) states:
/-----------
       -i[extension]

specifies that files processed by the "<>" construct are to be edited
in-place.  It does this by renaming the input file, opening the output
file by the original name, and selecting that output file as the default
for print() statements.
\-----------

I guess adding

"It does this by redirecting the output to a temporary file and then
moving the temporary file to the original file. "

to sed's man page would clarify things. (And could close the bug!)

Optionally add a warning that file properties might be changed.

Beste Grüße,

Johannes


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to