bug-grep
[Top][All Lists]
Advanced

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

Re: Excluding files with grep


From: Tony Abou-Assaleh
Subject: Re: Excluding files with grep
Date: Tue, 7 Nov 2006 14:49:06 -0400 (AST)

> 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]----------------------




reply via email to

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