Tuesday, September 20, 2011

Extracting File Name , Extension , File Name Without Extension In Shell Script


First, get file without path:
filename=$(basename $fullfile)
extension=${filename##*.}
filename=${filename%.*}