Bash 取字符串的最后 N 个字符: ${str:0-N:LENGTH} or ${str:0-N}
https://tldp.org/LDP/abs/html/string-manipulation.html
> file_name=/app/xxx/yyy/zzz.20210915
> echo echo ${file_name:0-8}
20210915
https://tldp.org/LDP/abs/html/string-manipulation.html
> file_name=/app/xxx/yyy/zzz.20210915
> echo echo ${file_name:0-8}
20210915