mirror of
git://git.sv.gnu.org/sed
synced 2026-11-21 01:43:22 +03:00
4c75f64068a7e1446c9aa6ae8f764e0ebddd67ef
When the line number ranges of two or more editing commands overlap, sed applies all commands but the first to a line that is just beyond the union of all ranges. E.g., with this command, seq 9|sed '2,7d;3,6d', sed would mistakenly delete line 8. * sed/execute.c (match_an_address_p) [ADDR_IS_NUM]: Make this function work also in this case. (match_address_p): Move the ADDR_IS_NUM + ...->line_number == ...->addr_number comparison "up" into match_an_address_p, so we can hoist two similar if/return blocks out of "if" and "else" branches. Change so that this function returns false when the current line number is outside the specified range. * testsuite/range-overlap.sh: New file, to test for this. * testsuite/Makefile.am (T): Add it to the list. * NEWS (Bug fixes): Mention it. Reported as http://bugs.gnu.org/19899
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.
Description
SED (stream editor) - неинтерактивный текстовый редактор командной строки
https://www.gnu.org/software/sed/
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%