bug-grep
[Top][All Lists]
Advanced

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

Re: Excluding files with grep


From: DarkRick
Subject: Re: Excluding files with grep
Date: Wed, 8 Nov 2006 10:31:29 -0800 (PST)

Thanks a lot again,

I've used GNU Grep with this "grep -rHc '[[:print:]]' mydirecotry | grep
':0$'", and I have no answer. I tried with "grep -rHc '[[:print:]]'
mydirecotry" and I a list of files like this:
./aaa.bmp:0
./bbb.txt:150
./ccc.txt:250
./ddd.doc:180
./fff.jpg:0

Where the damaged files are aaa.bmp and 
http://www.nabble.com/file/4037/fff.jpg fff.jpg . When I see the content of
the files that I'm looking for, I find that these files are like the
attached file.

Thanks again.

DarkRick


Tony Abou-Assaleh-2 wrote:
> 
>> So, and when I display the Unix Utils Grep Help. it shows:
>> Turbo GREP  Version 1.2  Copyright (c) 1987, 1989 Borland International
>> Syntax:  GREP [-rlcnvidzuwo] searchstring file[s]
> 
> The grep that you are using is "Turbo GREP" and not "GNU grep". I
> recommend that you download and install "GNU grep" because it has many
> additional extensions that are not available in Turbo GREP.
> 
>> So, and i try to call "grep -rHc '[[:print:]]' mydirecotry" and it shows
>> this answer:
>> Error: Invalid option -H
> 
> I am not sure about the behaviour of Turbo GREP, but GNU grep
> automatically prints the file names if you are grepping multiple files.
> Try:
> 
> grep -rc '[[:print:]]' mydirecotry
> 
> (i.e., without -H) and see if it give the desired output, which should be
> file names and the number of matches.
> 
> you can also try:
> 
> grep -rc '[[:print:]]' mydirecotry/*.*
> 
> Cheers,
> 
> TAA
> 
> -----------------------------------------------------
> Tony Abou-Assaleh
> Email:    address@hidden
> Web site: http://tony.abou-assaleh.net
> ----------------------[THE END]----------------------
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Excluding-files-with-grep-tf2546079.html#a7244127
Sent from the Gnu - Grep mailing list archive at Nabble.com.





reply via email to

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