Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash true if grep has output

if grep -q PATTERN file.txt; then
    echo found
else
    echo not found
fi
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #bash #true #grep #output
ADD COMMENT
Topic
Name
7+9 =