Created
March 10, 2015 19:22
-
-
Save derektamsen/ff955c087430b80c4eb8 to your computer and use it in GitHub Desktop.
These aliases help convert text from upper case to lower case with 'upper2lower' or lower case to upper case with 'lower2upper'. This will handle mixed case and ensure the output is all lower or all upper. It also ignores any non-alpha characters and includes them in the output.
This file contains 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
#!/usr/bin/env sh | |
upper2lower () { | |
echo "${@}" | tr '[:upper:]' '[:lower:]' | |
} | |
lower2upper () { | |
echo "${@}" | tr '[:lower:]' '[:upper:]' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment