[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-hackers-public] Re: using grep to scan projects
From: |
Nicodemo Alvaro |
Subject: |
[Savannah-hackers-public] Re: using grep to scan projects |
Date: |
Sat, 16 May 2009 22:26:26 -0400 |
On 5/16/09, Nicodemo Alvaro <address@hidden> wrote:
> Hi, I've been looking into using grep as a tool to scan projects that
> might not meet the hosting requirements of Savannah.
>
> The query that I have tried using is:
>
> grep -r -L -f license_notice --exclude-from=exclude_files $dir > no_notice
Okay, I made a sort of a mistake here. I usually use -L to find files
without the Copyright. It would be better to use -l if only one
license notice text is there. Having all license notices in one file
makes it more prone to error, I think.
grep -r --files-with-matches --file license_notice
--exclude-from=exclude_files $dir > notice_type
So this time --files-with-matches (-l) would list all files that match
any of the lines in the license_notice file.
--
Nicodemo