摘要: shell字符串的截取的问题: 一、Linux shell 截取字符变量的前8位,有方法如下: 1.expr substr “$a” 1 8 2.echo $a|awk ‘{print substr(,1,8)}’ 3.echo $a|cut -c1-8 4.echo $ 5.expr $a : ‘\(.\\).*’ 6.echo $a|dd bs=1 co... 阅读全文
posted @ 2011-09-23 15:06 katago 阅读(219) 评论(0) 推荐(0)