Deutsch English Français Italiano |
<t33moh$4kn$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ghost-Raider <ghost-raider@compuserve.com> Newsgroups: fr.comp.os.linux.configuration Subject: Re: Configuration d'un super PC Linux pour Ghost "Michu" Raider - questions sur le langage de commande Date: Tue, 12 Apr 2022 13:11:13 +0200 Organization: A noiseless patient Spider Lines: 31 Message-ID: <t33moh$4kn$2@dont-email.me> References: <t2f9qm$8hh$1@dont-email.me> <t2ffi3$2acr$1@news.gegeweb.eu> <t2fmhl$mca$1@dont-email.me> <t2gtq9$d11$2@news.gegeweb.eu> <t2h254$buh$1@dont-email.me> <t2h7tk$jtf$1@news.gegeweb.eu> <t2hds0$bsn$1@dont-email.me> <t2hick$9gd$1@ns507557.dodin.fr.nf> <t2hne3$8mm$1@dont-email.me> <t2jcfi$1s4n$1@gioia.aioe.org> <t2jgu8$9bq$1@dont-email.me> <t2jhs7$ke$2@gioia.aioe.org> <t2jirv$i83$1@dont-email.me> <slrnt514de.175.sc@scarpet42p.localdomain> <t2rn6i$bi6$1@dont-email.me> <t2seor$19s1$1@gioia.aioe.org> <t2sfnl$h0i$1@dont-email.me> <slrnt53h59.1fu.sc@scarpet42p.localdomain> <t2trir$bpg$1@dont-email.me> <t2v12o$iub$1@ns507557.dodin.fr.nf> <20220410174507.06013648@coffee.novazur.fr> <t2vm5i$sco$1@ns507557.dodin.fr.nf> <20220411111453.1ad4d461@coffee.novazur.fr> <t32a3p$lsi$1@ns507557.dodin.fr.nf> <t33bej$25kp$1@news.gegeweb.eu> <t33fnk$gkk$1@dont-email.me> <slrnt5ali3.51a.lhh+news-no_spam@hercule.home.arpa> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 12 Apr 2022 11:11:13 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="d860c06a2277588cb8887650fa56c50f"; logging-data="4759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NCDInE2krbs//IZmME8EoDgtvhXDC87U=" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Cancel-Lock: sha1:/S7/oW+lsb6LfvQpmjwfYXn+Lh0= In-Reply-To: <slrnt5ali3.51a.lhh+news-no_spam@hercule.home.arpa> Content-Language: fr Bytes: 3063 Le 12/04/2022 à 12:36, Jacques L'helgoualc'h a écrit : > Le 12-04-2022, Ghost-Raider a écrit : > [...] >> - la commande grep permet-elle l'utilisation des opérateurs logiques : >> AND, OR, XOR ? > > Grep utilise les expressions régulières, OR est facile : > > grep 'GR\|PC' fichier.txt > > mais pour AND, c'est plus tordu : > > grep -E 'GR.*PC|PC.*GR' > > et il y a six cas pour le double AND. > > > a XOR b = ( a AND NOT b ) OR ( NOT a AND b ) # l'un mais pas l'autre > = ( a OR b ) AND NOT ( a AND b ) # ou mais pas et > > c'est déjà moche --- grep offre l'option négative -v, mais il faudra > cascader deux grep. > > > Il y a Awk, ... mais Sed peut le faire, de manière plutôt illisible ;) > OK, merci. Je note tous tes exemples, tu ne parles pas dans le vide. -- Ils y reviendront, au cheval, ils y reviendront, et au galop !