Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2008 20:17:28 +0200
From:      "Aggelidis Nikos" <aggelidis.news@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Using grep to search a repository
Message-ID:  <30fc78250811111017l5f087dc8o52c1f1367e056ecd@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi to all the list,

i have a project with a lot of bash scripts in a folder hierarchy.I
haven't wrote the project myself so many times i have to search for
the definition of a function. For this purpose i decided to use grep
{recursively}.
The problem is that the project is an svn repository... so grep
returns results from .svn and it is really messes up the outcome of
grep. I tried bypassing the problem using the `--exclude=file_pattern'
but since its use is for files not directories it doesn't work.... So
the questions are:

1) Can i bypass certain directories{i.e. '.svn' or 'log/'}, using
grep? {or a combination of tools + grep}

2) Is there any other tool you would use for this job?

thanks in advance for your help,
-nicolas

PS: if it matters i prefer using gnu grep.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?30fc78250811111017l5f087dc8o52c1f1367e056ecd>