grep -c -o does not print count of occurrences
Bug #277528 reported by
era
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grep |
Unknown
|
Unknown
|
|||
grep (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: coreutils
vnix$ grep -c -o fnord <<HERE
> fnord fnord fnord
> HERE
1
One could expect the result to be three, with -o and -c, not one. Some non-GNU greps allegedly work that way. As it is, the combination of -c -o is rather useless.
If it cannot be fixed, then perhaps a warning about the uselessness of this combination of options should be printed.
vnix$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
vnix$ dpkg -l coreutils | tail -1
ii coreutils 6.10-3ubuntu2 The GNU core utilities
To post a comment you must log in.
thanks for your report. assigning to grep.
can you please provide the output of the command "apt-cache policy grep"
Thanks in advance.