From owner-freebsd-questions@FreeBSD.ORG Tue Nov 11 18:20:10 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11CC5106564A for ; Tue, 11 Nov 2008 18:20:10 +0000 (UTC) (envelope-from aggelidis.news@gmail.com) Received: from mail-gx0-f15.google.com (mail-gx0-f15.google.com [209.85.217.15]) by mx1.freebsd.org (Postfix) with ESMTP id 20D0D8FC17 for ; Tue, 11 Nov 2008 18:19:19 +0000 (UTC) (envelope-from aggelidis.news@gmail.com) Received: by gxk8 with SMTP id 8so76524gxk.12 for ; Tue, 11 Nov 2008 10:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=0cot4nOu4wlXsEFIWeY1gYs73nVO/W79H6zCwQPW4xU=; b=cTcvCBvJHSSJ6rr5oSVqb65PGqn8IipGG/WvUSgkZ9+QrnuoGbiB5ZMNHhZLwOwgkK JrZJqvn42ydNFb4oDhjGhiqPxDvRejB53uWO35pm0EYCUBn84/+/+bOcHgGjQAR0hGsA zUiahH+GbU/nUGUJtMeWJaPyFEe+R9T09mGR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=qI29417/y+0CfcDidhtCNcsTBpDd9m8cGPae0jwkMzW8O553JTtz4SUhU2HhYScbXn Ho3VKbtJvp1HrkcSHxTasXlKEFixprzx7/Jj9AHkeY+tforxht99enfLtRAbUWnrIUcS 0lGe8ohM0ocOa9stx0wMrKbBEAAHiUSVx7NAA= Received: by 10.100.143.14 with SMTP id q14mr3286636and.47.1226427448698; Tue, 11 Nov 2008 10:17:28 -0800 (PST) Received: by 10.100.229.10 with HTTP; Tue, 11 Nov 2008 10:17:28 -0800 (PST) Message-ID: <30fc78250811111017l5f087dc8o52c1f1367e056ecd@mail.gmail.com> Date: Tue, 11 Nov 2008 20:17:28 +0200 From: "Aggelidis Nikos" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Using grep to search a repository X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 18:20:10 -0000 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.