Skip to content

Instantly share code, notes, and snippets.

View mdtusz's full-sized avatar

Miklós Tusz mdtusz

View GitHub Profile
@mdtusz
mdtusz / bash-path-vars
Created December 12, 2018 15:55 — 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
@mdtusz
mdtusz / bash-path-vars
Created December 12, 2018 15:55 — 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