1、首先打开代码编辑器,选择bash脚本模式。
3、其中echo ${#start_time}是输出变量的长度。
5、但是想要截取到字符串最后一个字符,则要写lastone=${start_time:5:6},这里截取的确实两个字符,一定要注意。