From: laredotornado on
Hi,

I'm using Mac OS 10.5.6. I want to search through a group of files
and determine which files have the string "styleClass" more than once
in the same line. So for example, if one file contained ...

===Begin=====
Hi there

Bye styleClass styleClass bye
====End=====

that would satisfy the conditions, but this file

===Begin ======
Hi
styleClass
styleClass
Bye
=====End =====

would not. Thanks for your help, - Dave
From: pk on
laredotornado wrote:

> Hi,
>
> I'm using Mac OS 10.5.6. I want to search through a group of files
> and determine which files have the string "styleClass" more than once
> in the same line. So for example, if one file contained ...
>
> ===Begin=====
> Hi there
>
> Bye styleClass styleClass bye
> ====End=====
>
> that would satisfy the conditions, but this file
>
> ===Begin ======
> Hi
> styleClass
> styleClass
> Bye
> =====End =====
>
> would not. Thanks for your help, - Dave

grep 'styleClass.*styleClass' yourfile
From: pk on
pk wrote:

> grep 'styleClass.*styleClass' yourfile

Ah, if you want the filenames, use "grep -l"
From: laredotornado on
On Feb 24, 11:46 am, pk <p...(a)pk.invalid> wrote:
> pk wrote:
> > grep 'styleClass.*styleClass' yourfile
>
> Ah, if you want the filenames, use "grep -l"

Once again, a 5 star answer. Thanks!