2011年12月30日

摘要: 1. 字符串相关操作1.1 获取字符串长度str="9.125.70.107 localhost domain"# length${#str}1.2 字符串截取 1.2.1 索引截取str="9.125.70.107 localhost domain"substr=${str:0:${#str}-3}echo $subStroutput:9.125.70.107 localhost dom 1.2.2 索引某个子字符串之后的字符串str="9.125.70.107_ localhost domain"sub="9.125.7 阅读全文
posted @ 2011-12-30 21:09 bannyle 阅读(297) 评论(0) 推荐(0)

导航