Why don't you use 'find' ?

Jamez.

-- 
http://root-box.info
Registered Linux user #324517

> Hi All
>
> I would like to ask you if you can help me with this:
>
> I need a search script that given certain parameters such as:
>
>       1) extension type (multiple)
> and
>       2) search text
>
> i will go through a certain folder and search within the documents
> (extension types chosen) for the given search text/(s). The text, such as
> 'Reports Live', should be searched for both the word  'Reports' and the
> word
> 'Live' seperatly but also together. The result should be a log file with
> the
> names of the documents found!
>
> Is this possible? What i did is the following:
>
>       rm search.log
>       touch search.log
>
>       for i in $1*$2
>               do
>                 if cat $i | grep -a $3 ; then
>                 echo $i >> search.log
>                 fi
>       done
>
>       Where   $1 = the folder searching in
>               $2 = One extension only!
>               $3 = Search text with no OR
>
>
> This works but its not exactly what i want! Are there any Search tools
> available or?
>
> Tahnks
> Nick
>
> _______________________________________________
> MLUG-list mailing list
> [email protected]
> http://mailserv.megabyte.net/mailman/listinfo/mlug-list
>

Reply via email to