How to separate the filename from the extensionOn this pageBASH1 min read · Knowledge BaseBASH filename=$(basename -- "$fullfile") extension="${filename##*.}" filename="${filename%.*}" Linked fromJohn Mayson's Website