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

Re: Opportunité de script shell



Re,

On Wed, Feb 08, 2012 at 04:41:02PM +0000, jerome.moliere@gmail.com wrote:

> Je me suis fait une appli java qui donne la meme chose...mais je
> suis decu de ne pas pouvoir combiner des criteres complexes dans
> find

Avec find, tu peux nier une condition de la recherche avec "!".


jfs@jones:/tmp$ find a/ \! -iname "toto.txt"
a/
a/b
a/b/c
a/b/c/tata.txt

jfs@jones:/tmp$ find a/ \! -iname "toto.txt" -o -iname "tata.txt"
a/
a/b
a/b/c
a/b/c/tata.txt

jfs@jones:/tmp$ find a/ -iname "toto.txt" -o -iname "tata.txt"
a/toto.txt
a/b/c/toto.txt
a/b/c/tata.txt


Faut voir si t'arriver à crafter la recherche exacte que tu veux avec
ça...

Hih,


-- 

JFS.


Reply to: