Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grep string in file

if grep -Fxq "pattern_to_search" file.txt; then #check if pattern string in file
  #do something
fi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #grep #string #file
ADD COMMENT
Topic
Name
1+1 =