bug-gnu-utils
[Top][All Lists]
Advanced

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

Info&man page again: --include


From: Jori Mantysalo
Subject: Info&man page again: --include
Date: Mon, 2 Jun 2003 09:04:28 +0300 (EEST)

Info grep says

`--include=FILE_PATTERN'
     When processing directories recursively, only files matching
     FILE_PATTERN will be search.

and man grep says

         --include=PATTERN
              Recurse in directories only searching file matching PATTERN.

But when testing:

address@hidden testi]$ ls test*
test1  test2
address@hidden testi]$ grep hello test*
test1:hello
test2:hello
address@hidden testi]$ grep --include="*1" hello test*
test1:hello

So it seems that --include has no special meaning when used with
--recusive . I think that it is good, but info page is misleading.


Another thing: what means "pattern"? Man page says

SYNOPSIS
       grep [options] PATTERN [FILE...]

        --include=PATTERN
              Recurse in directories only searching file matching PATTERN.

Is "file matching pattern" some kind of idiom? One could think that grep
uses same pattern when checking file name matches and when doing real
search inside file.

-- 
Jori Mäntysalo




reply via email to

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