Skip to content

Instantly share code, notes, and snippets.

@coderofsalvation
Created January 8, 2014 20:50
Show Gist options
  • Save coderofsalvation/8324402 to your computer and use it in GitHub Desktop.
Save coderofsalvation/8324402 to your computer and use it in GitHub Desktop.
convert a string to lower characters
# convert a string to lower characters
# @param string input
function strtolower()
{
[ -z "$1" ] && return 1
printf "%s\\n" "$@" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' # tr '[:upper:]' '[:lower:]'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment