Skip to content

Instantly share code, notes, and snippets.

@Ketrel
Created January 23, 2018 17:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Ketrel/bb32c27ffd95641aefc7a58e5b1e4044 to your computer and use it in GitHub Desktop.
posix substring check
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