Created
June 29, 2022 12:29
-
-
Save n4bb12/c45dd3f2c0a89251603e131948340c62 to your computer and use it in GitHub Desktop.
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
slugify () { | |
echo "$@" | iconv -c -t ascii//TRANSLIT | sed -E 's/[~^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+|-+$//g' | tr A-Z a-z | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment