[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep
From: |
Jérôme Arfouche |
Subject: |
Re: grep |
Date: |
Mon, 6 Oct 2008 07:44:59 -0400 |
hi
thanks for replying so fast
my grep version is "grep (GNU grep) 2.5.1"
and i have this problem when i try to do this:
grep -c -d skip "\#\!" | grep :0 | wc -l
basically it's supposed to look for FILES (skip dir) that don't have the
shebang line and count them, that's it
for some reason it keeps counting my directories with it
2008/10/4 Bob Proulx <address@hidden>
> Jérôme Arfouche wrote:
> > i'm not sure this is a real bug (maybe i'm just using it wrong) but grep
> -c
> > and grep -d skip don't seem to be working together, it looks like -c
> > overwrites -d and searches directories anyway...
>
> Thanks for the report. But I cannot recreate the problem that you
> report. Could you provide an example? Something small that
> illustrates the problem. I tried this:
>
> mkdir t && cd t
> mkdir a b c
> echo foo1 > a/one
> echo foo2 > b/two
> echo foo3 > c/three
> echo foo4 > four
>
> grep -c -d recurse foo ./*
> ./a/one:1
> ./b/two:1
> ./c/three:1
> ./four:1
>
> grep -d skip -c foo ./*
> ./four:1
>
> grep -c -d skip foo ./*
> ./four:1
>
> Looks okay to me. What version of grep are you running?
>
> grep --version
>
> Bob
>
- grep, Jérôme Arfouche, 2008/10/04
- Re: grep, Bob Proulx, 2008/10/04
- Re: grep,
Jérôme Arfouche <=
- Re: grep, Jérôme Arfouche, 2008/10/06