I want to get the filename (without extension) and the extension separately.
The best solution I found so far is:
NAME=`echo \"$FILE\" | cut -d\'.\'
Smallest and simplest solution (in single line) is:
$ file=/blaabla/bla/blah/foo.txt echo $(basename ${file%.*}) # foo