Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

terminal bash grep word inside files directory

grep -nr 'yourString*' .
The dot at the end searches the current directory. Meaning for each parameter:

-n            Show relative line number in the file
'yourString*' String for search, followed by a wildcard character
-r            Recursively search subdirectories listed
.             Directory for search (current directory)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #terminal #bash #grep #word #files #directory
ADD COMMENT
Topic
Name
1+3 =