网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

shell脚本如何截取子字符串

时间:2024-10-12 01:49:56

1、首先打开代码编辑器,选择bash脚本模式。

shell脚本如何截取子字符串

3、其中echo ${#start_time}是输出变量的长度。

shell脚本如何截取子字符串

5、但是想要截取到字符串最后一个字符,则要写lastone=${start_time:5:6},这里截取的确实两个字符,一定要注意。

shell脚本如何截取子字符串
© 2025 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com