by cduzz · 4y ago · 0 comments
Traditional shell might be:
grep -q thing < file
if [ $? -eq 0 ] ; then echo "thing is there ; fi
VS just using if to look at the ES of the prior program if
grep -q thing < file
then
echo "thing is there"
fi
"test" and [[ are a fine programs / tools for evaluating strings, looking at file system permissions, doing light math, but it isn't the only way to interact with conditionals.