Bash 取字符串的最后 N 个字符

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://www.cnblogs.com/chenjo/p/15392331.html