On 2008-12-24, 01:22 GMT, MHR wrote:
> On Tue, Dec 23, 2008 at 4:34 PM, Matej Cepl wrote:
>> On 2008-12-23, 12:15 GMT, James Bensley wrote:
>>> find . -exec grep -q "$1" '{}' \; -print >> ./found_files
>>
>> I think you can have only one action (either -exec or -print),
>> but not sure about it. An
On Wed, 2008-12-24 at 01:34 +0100, Matej Cepl wrote:
> On 2008-12-23, 12:15 GMT, James Bensley wrote:
> > find . -exec grep -q "$1" '{}' \; -print >> ./found_files
>
> I think you can have only one action (either -exec or -print),
> but not sure about it. Anyway, my first instinct when things ar
On Tue, Dec 23, 2008 at 4:34 PM, Matej Cepl wrote:
> On 2008-12-23, 12:15 GMT, James Bensley wrote:
>> find . -exec grep -q "$1" '{}' \; -print >> ./found_files
>
> I think you can have only one action (either -exec or -print),
> but not sure about it. Anyway, my first instinct when things are
> g
On 2008-12-23, 12:15 GMT, James Bensley wrote:
> find . -exec grep -q "$1" '{}' \; -print >> ./found_files
I think you can have only one action (either -exec or -print),
but not sure about it. Anyway, my first instinct when things are
getting to be more complicated is to use while cycle, like th
Thanks all for your prompt replies. I have picked the best bits of
what I received and make my own script from that.
Thanks a lot guys, a good lesson in shell scripting today! Greatly
appreciated ;)
Regards,
James.
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GIT/MU/U dpu s: a--> C++>$ U+> L
James Bensley schrieb:
> For those interested here is an updated version of my script but still
> no luck :(
>
> #!/bin/bash
> rm -f ./found_files
> touch ./found_files
> find . -exec grep -q "$1" '{}' \; -print >> ./found_files
> i=1
> while [ $i -le `wc -l found_files` ] ; do
> line=`head -$
> Scenario:
> /some/directory/where/blacklist/is/stored contains about 40-50 folders
> called, adult, gambling, banking, warez etc. There is a folder for
> each blocking category (and in each folder is two files, urls and
> domains, standard stuff for web filtering!)
>
> I have a script to search
For those interested here is an updated version of my script but still
no luck :(
#!/bin/bash
rm -f ./found_files
touch ./found_files
find . -exec grep -q "$1" '{}' \; -print >> ./found_files
i=1
while [ $i -le `wc -l found_files` ] ; do
line=`head -$i found_files | tail -1`
grep -iv "$1"
Hey guys,
I'm a bit of a beginner (understatement!) with shell scripting and
seek help! I am setting up our new squid proxy. Its working a treat
and squidGuard is the icing on the cake. But, I am trying to write a
shell script to search through our black list category's for
squidGuard and remove t
9 matches
Mail list logo