On Sun, Oct 31, 2004 at 02:21:11PM +0100, Aldo wrote: > Hello, > > si je fais � la main: > cat mmm |grep -v '^ODE' >nnn > �a me copie en principe le contenu de mmm dans nnn, sauf la ligne > contenant un mot ou partie de mot contenant ODE ? es-ce exact?
Ben non... Comme l'indique Pascal, le caract�re ^ correspond au d�but de ligne et non de mot. pour "matcher", reconna�tre un d�but de mot, c'est la s�quence \b qu'il faut utiliser. > > Eh bien, alors pourquoi �a ne le fais pas quand je reprend texto cette > commande dans un script? > Si le mot � exclure est "CODE" faut-il im�rativement faire un > grep -v '^cODE' >nnn > ? grep -v '\bCODE\b' plus pr�cis que grep -v '\bCODE' qui ne laissera pas passer CODEUR par ex. dom > > Aldo. > > > _______________________________________________ > Liste de diffusion CarrefourBLinuX > [EMAIL PROTECTED] > http://lists.freearchive.org/mailman/listinfo/carrefourblinux > Signets : http://fr.groups.yahoo.com/group/carrefourblinux/links/ > Archives : http://lists.freearchive.org/pipermail//carrefourblinux > Anciennes archives (Yahoogroupes) : > http://fr.groups.yahoo.com/group/carrefourblinux/messages > Pour s'inscire par courriel : > 'mailto:[EMAIL PROTECTED]' > Pour se desinscrire par courriel : > 'mailto:[EMAIL PROTECTED]' -- +------------------------------------o-------------------------------------+ | P-mail: | E-mail: | | E.N.S.T. - Dep. TSI | [EMAIL PROTECTED] | | Dominique Asselineau | Phone: (33/0) 1 45 81 78 91 | | 46, rue Barrault | Fax: (33/0) 1 45 81 37 94 | | 75634 PARIS Cedex 13 - France | | +------------------------------------o-------------------------------------+ _______________________________________________ Liste de diffusion CarrefourBLinuX [EMAIL PROTECTED] http://lists.freearchive.org/mailman/listinfo/carrefourblinux Signets : http://fr.groups.yahoo.com/group/carrefourblinux/links/ Archives : http://lists.freearchive.org/pipermail//carrefourblinux Anciennes archives (Yahoogroupes) : http://fr.groups.yahoo.com/group/carrefourblinux/messages Pour s'inscire par courriel : 'mailto:[EMAIL PROTECTED]' Pour se desinscrire par courriel : 'mailto:[EMAIL PROTECTED]'
