1.数组循环输出
#!/bin/bash array=( 0,1,2,3.0 0,11,22,33.0 0,111,222,333.0 0,1111,2222,3333.0 ) for((row=0;row<${array[@]};row++)) do echo "${array[rows]}" var=`echo "${array[rows]}" | awk -F "," '{printf "%d", $2}'` echo $var done
标签:脚本,常用,shell,33.0,3.0,row From: https://www.cnblogs.com/keroleo/p/16997843.html