Answers for "condition expected: grep"

0

condition expected: grep

if [ "$(cat textfile.txt | grep 'search string')" = "" ]; then; echo "some string"; fi;
Posted by: Guest on March-21-2022
0

condition expected: grep

if [ "$(cat textfile.txt | grep 'search string')" == "" ] ; then
    echo "It's not there!"
fi
Posted by: Guest on March-21-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language