Skip to content

Instantly share code, notes, and snippets.

@markjfletcher
Created January 17, 2016 15:15
Show Gist options
  • Save markjfletcher/058e6d6a062af2796b96 to your computer and use it in GitHub Desktop.
Save markjfletcher/058e6d6a062af2796b96 to your computer and use it in GitHub Desktop.
Slicing Filenames
VAR="foo.gif"
echo "File name - ${VAR%.*}"
echo "File extension - ${VAR#*.}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment