shell用法

字符串切割

expr substr "test,sfc" 1 3

字符串长度

expr length "test,sfc"

字符串中字符出现的位置

awk -v a="test,sfc" -v b="sfc" 'BEGIN{print index(a,b)}'

字符串截取方法:https://www.cnblogs.com/kings-9/p/7642628.html

posted @ 2019-10-17 11:49  DesignerA  阅读(97)  评论(0编辑  收藏  举报