2015年11月24日

shell 字符串切分成数组

摘要: #!/bin/bashread i1 i2echo $i1echo $i2OLD_IFS=$IFS#设置IFS为空格和逗号IFS=" ,"arr=($i2)IFS=$OLD_IFSecho ${#arr[@]}执行1 2 3 4 5 612 3 4 5 65调用read,由用户输入,第一个输入数字... 阅读全文

posted @ 2015-11-24 10:55 develooop 阅读(1287) 评论(0) 推荐(0) 编辑

导航

AmazingCounters.com