bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stanislav Brabec
Subject: bug#20796: [PATCH] Document behavior of sed -i -
Date: Mon, 22 Jun 2015 15:43:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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: address@hidden
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





reply via email to

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