Effectivement, je pensais qu'il s'agissait des nom de fichier (Ça m'apprendra à lire). Dans ce cas la sans -w, il faudra se diriger vers un truc du genre toto[^A-Za-z0-9] (enfin, doit y avoir mieux)
Exemple :
$ cat fich | grep "toto"
toto titi
totot titi
titoto
toto
99toto97
$ cat fich | grep "toto[^A-Za-z0-9]"
toto titi
[^] # Re: option -w
Posté par Joris Dedieu (site web personnel) . En réponse au message GREP : comment obtenir les fichiers contenant exactement le mot "toto" ?. Évalué à 1.
Exemple :
$ cat fich | grep "toto"
toto titi
totot titi
titoto
toto
99toto97
$ cat fich | grep "toto[^A-Za-z0-9]"
toto titi