this expr can be really useful to determine if a term has been found or not using grep. short and sweet enough for me.
if [ ! -z $(echo $var | grep “cond”) ]; then echo “found”; else echo ” not found”; fi
Open Source Technologies At Work
Only Passion Matters
this expr can be really useful to determine if a term has been found or not using grep. short and sweet enough for me.
if [ ! -z $(echo $var | grep “cond”) ]; then echo “found”; else echo ” not found”; fi