Created
March 13, 2016 21:56
-
-
Save tatic0/a01ed43564600ba05c5a to your computer and use it in GitHub Desktop.
explode filename 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
#!/bin/bash | |
filename=file.png | |
echo "${filename:0:(-4)} <--> ${filename:(-4)}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
darn ugly, must be 3 letter extensions.
just like playing with string in twisted ways ;)