View Single Post
Old 11-30-2004, 01:56 AM  
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
Programers and unix admins:

ok.

here is a bash command line question:

let's say I'm currently in a directory call "members".
in the "members" directory there are sub-directories: "john", "Tami", "Bob".
inside each of those sub directories there are a few .html files, one of them is "index.html".

what I want is to scan the content of those "index.html" files in every sub-directory ("john", "Tami", "Bob")
and print out the "index.html" files that DO NOT contain the word "myimage.gif".

how do I do that? this is what I tried and failed:

find . -type f -name "index.html" | xargs grep -l -v 'myimage.gif'
find . -type f -name "index.html" | xargs grep -l -v "myimage.gif"
find . -type f -name "index.html" | xargs grep -l -v 'myimage\.gif'


anyone know a good unix forum I can ask this question?
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote