Answers for "how to grep a directory for a "string in a file""

1

grep search for string in directory

grep -nr 'yourString*' .
Posted by: Guest on May-03-2020
-1

grep string in file

if grep -Fxq "pattern_to_search" file.txt; then #check if pattern string in file
  #do something
fi
Posted by: Guest on November-02-2021

Code answers related to "how to grep a directory for a "string in a file""

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language