【Linux】Shell - 字符串中插入字符

str="20171125"html $ echo ${str:0:4}-${str:4:2}-${str:6} spa 2017-11-25htm 取子串 * $ var="get length of me" $ echo ${var:0:3} getblog $ echo ${var(-2)} #反方向 me 文檔 $ echo `expr substr "$var" 5 3` the $ e
相關文章
相關標籤/搜索