Jim Meyering c033bdee41 sed -i: do not treat "-" as a file name
Most GNU utilities treat "-" as standard input, sed itself does that --
in most contexts.  However, since the addition of support for
--in-place (-i) in sed-4.0, sed -i has treated a "-" argument as a
file name, i.e., like ./-.  Now, that usage evokes a diagnostic:

  $ sed -i s/a/b/ -
  sed: couldn't edit -: is a terminal

If you require the old behavior, specify the file name as "./-".
Prompted by the report/patch from Stanislav Brabec in
http://bugs.gnu.org/20796 to document the strangely
inconsistent legacy behavior.

* sed/execute.c (open_next_file): Call panic before
even attempting to operate on the file descriptor.
* testsuite/in-place-hyphen.sh: New file.  Test for this.
* testsuite/Makefile.am (T): Add it.
* NEWS (Feature removal): Mention it. Admittedly, the old behavior
feels more like a misfeature.
2015-06-20 19:58:08 -07:00
2015-05-01 18:09:51 -07:00
2014-11-30 18:59:33 -08:00
2008-04-10 11:14:38 +02:00
2014-11-30 18:59:33 -08:00
2014-11-30 18:59:33 -08:00
2004-10-20 21:42:31 +00:00
2015-05-01 18:09:51 -07:00
2015-05-01 18:09:51 -07:00
2015-06-20 19:58:08 -07:00
2014-11-30 18:59:32 -08:00

This is the GNU implementation of sed, the Unix stream editor.

See the NEWS file for a brief summary and the ChangeLog for
more detailed descriptions of changes.

See the file INSTALL for generic compilation and installation
instructions.

See the file BUGS for instructions about reporting bugs.

The file README.boot gives instructions for making a "bootstrap"
version of sed on systems which lack any pre-existing and working
version of sed.
S
Description
SED (stream editor) - неинтерактивный текстовый редактор командной строки
https://www.gnu.org/software/sed/
Readme GPL-3.0
3 MiB
0 Stars 1 Watchers 0 Forks
Languages
Shell 43%
C 26.4%
Perl 16.5%
sed 7.3%
Makefile 5.2%
Other 1.6%