grep: fix -E + {range}; fix -o not printing all matches (bug 489)
two different bugs, one with EXTRA_COMPAT, other without. function old new delta grep_file 1132 1129 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -85,4 +85,9 @@ testing "grep is also egrep" "egrep foo" "foo\n" "" "foo\nbar\n"
|
||||
testing "egrep is not case insensitive" \
|
||||
"egrep foo ; [ \$? -ne 0 ] && echo yes" "yes\n" "" "FOO\n"
|
||||
|
||||
testing "grep -E -o prints all matches" \
|
||||
"grep -E -o '([[:xdigit:]]{2}[:-]){5}[[:xdigit:]]{2}'" \
|
||||
"00:19:3E:00:AA:5E\n00:1D:60:3D:3A:FB\n00:22:43:49:FB:AA\n" \
|
||||
"" "00:19:3E:00:AA:5E 00:1D:60:3D:3A:FB 00:22:43:49:FB:AA\n"
|
||||
|
||||
exit $FAILCOUNT
|
||||
|
Reference in New Issue
Block a user