Created
July 9, 2015 08:16
-
-
Save veggiemonk/696508a6009a25e52c81 to your computer and use it in GitHub Desktop.
regex
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
# from hyphen/dash to camelCase | |
rename 's/-(\w)/\U$1/g' list-of-files | |
# from camelCase to hyphen/dash | |
sed -e 's/\([A-Z]\)/-\L\1/g' -e 's/^-//' <<< "MyDirectoryFileLine" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment