[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-developers] Shel command



Wow... Egrep has a ton of options.

When I run [egrep my_logo.jpg -r /home/sites/*], it's not only finding the
image name in the html files, but it's also finding it hundreds of times in
the apache log files. Is there a way to limit it to only index.html or
*.html?


Regards, 

Chris


-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx] On Behalf Of Michael
Stauber
Sent: Wednesday, October 15, 2003 11:47 AM
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: Re: [cobalt-developers] Shel command


Hi Chris,

> Is their command to search for text within a file? I'm trying to find 
> all index.html files (in /home/sites/) containing the text 
> my_logo.jpg.
>
> i.e. locate index.html | [command to find my_logo.jpg]
> -or-
> Something like: find /home/sites/.*index.html | grep -v -g 
> '^/home/sites/.*/_vti_cnf' | [command to find my_logo.jpg]

Use the command "egrep":

	egrep my_logo.jpg -r /home/sites/*

Use "man egrep" to find out more about this command. It has some pretty 
powerful options.

-- 

With best regards,

Michael Stauber

_______________________________________________
cobalt-developers mailing list cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers