John Mayson's Website

How to separate the filename from the extension

On this page

BASH

filename=$(basename -- "$fullfile")
extension="${filename##*.}"
filename="${filename%.*}"