上一页 1 ··· 18 19 20 21 22
摘要: (1)awk中函数substr substr(源字符串,开始索引,长度) 开始索引以0开始示例:awk '{$a=substr($0,0,2);print $a;}' filename 假设文件中为只有一行为abcdefg,则返回结果为ab(2)expr substr 字符串 开始索引 长度 开始索... 阅读全文
posted @ 2015-09-14 16:56 Big_Foot 阅读(9001) 评论(0) 推荐(0)
摘要: ${expression}一共有9种使用方法。${parameter:-word},如果parameter为空,则用word的值做parameter的缺省值${parameter:=word},在2 的基础上,把word的值赋值给parameter${parameter:?word},如果param... 阅读全文
posted @ 2015-09-14 16:53 Big_Foot 阅读(670) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22