sed: deal with peculiar behavior of '2d;2,1p' in GNU sed

function                                             old     new   delta
process_files                                       2173    2120     -53

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-07-10 11:55:20 +02:00
parent 52a426744e
commit ae68f1133f
2 changed files with 16 additions and 12 deletions

View File

@ -220,4 +220,9 @@ testing "sed d does not break n,regex matching #2" \
"second2\nthird2\n" "" \
"first\nsecond\nthird\nfourth\n""first2\nsecond2\nthird2\nfourth2\n"
testing "sed 2d;2,1p (gnu compat)" \
"sed -n '2d;2,1p'" \
"third\n" "" \
"first\nsecond\nthird\nfourth\n"
exit $FAILCOUNT