拿到文件的后缀 basename $file | rev | cut -d . -f 1- | rev via: https://wangchujiang.com/linux-command/c/cut.html