Re: find et negation de regex
[ Nouvelle discussion
| Répondre au groupe
|
fr.comp.os.unix ]
Michel Talon a écrit :
> Nicolas MICHEL <Nicolas-MICHEL'_remove_'@bluewin.ch> wrote:
>> Stephane Chazelas <cette.adresse@est.invalid> wrote:
>>
>>> find . ! -name '*.htm' ! -name '*.html' ... -exec rm -f {} +
>> J'arrive sur le tard ...
>> Mais j'ai une petite question :
>> Je suis surpris qu'il n'y ait pas d'opérateur "-and" ou "-or" dans cette
>> commande. Dans quel cas faut-il les utiliser ?
>>
>> Merci :)
>>
>
> expression -and expression
> expression expression
> The -and operator is the logical AND operator. As it is implied
> by the juxtaposition of two expressions it does not have to be
> specified.
>
Hi, Bonjour,
-and n'est pas portable, la syntaxe d'origine est -a.
http://www.opengroup.org/onlinepubs/009695399/utilities/find.html
expression [-a] expression
Conjunction of primaries; the AND operator is implied by the
juxtaposition of two primaries or made explicit by the optional -a
operator. The second expression shall not be evaluated if the first
expression is false.
à ce propos, notez le [-a], qui est implicite...
Regards, Cordialement,
Cyrille Lefevre.
--
mailto:Cyrille.Lefevre-news%nospam@laposte.net.invalid
supprimer "%nospam% et ".invalid" pour me repondre.
remove "%nospam" and ".invalid" to answer me.

|
 cette fonctionnalité est reservée aux membres ayant une session active !
|