Bash Get Extension from filename amit - 09 Jan 2013 fileName=’/path/to/testfile.ext' ext=${fileName/*./} echo “Extension: $ext”