
Se acerca de
grep -rin 'text' /path/to/direcotry
Pero no quiero buscar en todos los archivos. Solo necesito verificar si aparece 'texto' en todos los archivos llamados wscript. ¿Cómo se puede hacer eso?
Respuesta1
hombre grep:
--include=GLOB
Search only files whose base name matches GLOB (using wildcard
matching as described under --exclude).
así que prueba esto:
grep -rin --include=wscript 'text' /path/to/files
Respuesta2
grep -rin 'text' `find /path/to/directory -name wscript`
Respuesta3
grep -rin 'your-text' /path/to/text/file/text-file.txt
Sin embargo, sólo funciona con archivos de texto.