if test "${myArray['key_or_index']+isset}"
then
echo "yes"
else
echo "no"
fi;
from : https://stackoverflow.com/questions/13219634/easiest-way-to-check-for-an-index-or-a-key-in-an-array
if test "${myArray['key_or_index']+isset}"
then
echo "yes"
else
echo "no"
fi;
In case if you want to check whether file does not contain a specific string, you can do it as follows. if ! grep -q SomeString "$File...
No comments:
Post a Comment