Created
January 23, 2018 17:36
-
-
Save Ketrel/bb32c27ffd95641aefc7a58e5b1e4044 to your computer and use it in GitHub Desktop.
posix substring check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkSubStr(){ | |
if [ ! -z "${1}" ] && [ -z "${1%%*${2}*}" ]; then | |
return 0 | |
else | |
return 1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment