GNU bug report logs - #33574
grep -c question

Previous Next

Package: grep;

Reported by: "Helen Grubner" <helen.grubner <at> fgznet.ch>

Date: Sun, 2 Dec 2018 07:15:02 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Helen Grubner" <helen.grubner <at> fgznet.ch>
To: <bug-grep <at> gnu.org>
Cc: 'Alexander Grubner' <alexander.grubner <at> fgznet.ch>
Subject: grep -c question
Date: Sun, 2 Dec 2018 08:07:53 +0100
[Message part 1 (text/plain, inline)]
Dear Team

 

Can you tell me, why I see this with grep -c on a file with following
content?

 

$ cat file_13.txt

1

2

3

4

5

6

7

8

9

10

11

12

13

 

$ grep -c 1 file_13.txt

5

 

Should it not show 6? When search for value 2, it is correct.

 

$ grep -c 3 file_13.txt

2

 

 

$ file file_13.txt

file_13.txt: ASCII text

 

Thank you

Alexander Grubner

 

[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.