Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux test if string exists in file

if grep -Fxq "string" file.txt; then 
	echo "Match"
else 
	echo "No match"
fi
 
PREVIOUS NEXT
Tagged: #linux #test #string #exists #file
ADD COMMENT
Topic
Name
9+2 =