I want to create a script that renames a file that has 2 extensions by deleting the midle extension. In reference to this, I found this great thread: Extract filename and extension in Bash
Someone posted there this in regards to shell parameter extension:
~% FILE="example.tar.gz"
~% echo "${FILE%%.*}"
example
~% echo "${FILE%.*}"
example.tar
~% echo "${FILE#*.}"
tar.gz
~% echo "${FILE##*.}"
gz
My question is on the above statement: how do you echo example.gz ?
Thanks