-
-
Save flappyBug/0458ae3f2817604ef5c157f749da7f34 to your computer and use it in GitHub Desktop.
Zsh: file base name and extension
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
#!/usr/bin/env zsh | |
f='example.txt' | |
echo ${f:r} | |
#=> example | |
echo ${f:e} | |
#=> txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment