Usuń rozszerzenie pliku Bash

$ filename=foo.txt
$ echo "${filename%.*}"
foo
Cooperative Crab