Created
July 15, 2016 05:40
-
-
Save ymauray/61872a2d58e18907f8682d0b4401f089 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
#! /bin/bash | |
a=/tmp/xx/file.tar.gz | |
# /tmp/xx | |
xpath=${a%/*} | |
# file.tar.gz | |
xbase=${a##*/} | |
# gz | |
xfext=${xbase##*.} | |
# file.tar | |
xpref=${xbase%.*} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment