bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27931: grep -o fails to count empty lines (Debain Bug #532541)


From: Santiago R.R.
Subject: bug#27931: grep -o fails to count empty lines (Debain Bug #532541)
Date: Thu, 3 Aug 2017 15:28:14 +0200

(Sorry if it's already filed, but I am unable to find it in the
bug archives)

Hi,

I'd like to forward this bug reported to Debian some years ago.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532541
It still happens in 3.1.

Quoting the original report:

When grepping for empty lines in a text file, grep works correctly in
most cases:

~$ grep ^$ myfile.txt 





~$ grep -n ^$ myfile.txt 
11:
15:
19:
21:
22:

However the -o option, which is supposed to return only the matching
parts of the search, fails:

~$ grep -o ^$ myfile.txt 
~$ grep -no ^$ myfile.txt
~$ 


Thanks,

Santiago





reply via email to

[Prev in Thread] Current Thread [Next in Thread]