Extract filename and extension from a string in Bash The Problem Given a file path string in Bash, how can I reliably extract the filename and extension, even in cases where the name contains multiple .s?