vms_path='/data1/scripts/vms_batch.txt' #vm csv IFS=$'\n' for line in $(awk 'NR>1' $vms_path) #跳过第一行 echo $line host=`echo $line |awk -F , '{print $1}'`