Subject: Re: bug#20796: [PATCH] Document behavior of sed -i -

From: Stanislav Brabec <[email-masked]>
Date: Mon, 22 Jun 2015 15:43:26 +0200

Jim Meyering wrote:

> However, rather than documenting this surprising behavior,
> I propose to remove the anomaly altogether with the attached patch.
> Does anyone see a reason to retain the behavior of treating "-"
> like "./-"?
>
The reason is simple: "sed -i" makes no sense on stdin, so the special 
handling od "-" is disabled.

We can either ignore "-i" for stdin, or report error:
"Editing standard input in place is an undefined operation."

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: [email-masked]
Lihovarská 1060/12                            tel: +49 911 7405384547
190 00 Praha 9                                 fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76