Skip to content

Instantly share code, notes, and snippets.

@npchandran
npchandran / bash-path-vars
Created November 10, 2015 09:27 — forked from caruccio/bash-path-vars
Path manipulation with bash vars
$ FILE=/some/path/to/file.txt
###################################
### Remove matching suffix pattern
###################################
$ echo ${FILE%.*} # remove ext
/some/path/to/file
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts