2019年3月14日

shell截取字符串的方法

摘要: shell中截取字符串的方法有很多中,${expression}一共有9种使用方法。${parameter:-word}${parameter:=word}${parameter:?word}${parameter:+word} 上面4种可以用来进行缺省值的替换。${#parameter}上面这种可 阅读全文

posted @ 2019-03-14 09:40 林肯公园 阅读(4490) 评论(0) 推荐(0)

shell生成随机字符串

摘要: #!/bin/bashi=1while [ $i -le 10000 ]doa=`echo `< /dev/urandom tr -dc A-Za-z0-9 | head -c6``echo -n -e "$a\t"b=`echo `< /dev/urandom tr -dc 0-9 | head  阅读全文

posted @ 2019-03-14 09:23 林肯公园 阅读(1070) 评论(0) 推荐(0)

导航