摘要:
实例程序是demo.sh#!/bin/bashwindows='windows'string='2 3 4 5 6'if [ ! -z $windows ];then arry=($string) total=0 for n in ${arry[@]} do (( total+=n )) donefiecho $total 在ubuntu10.04下运行 sh -x demo.sh 出现下面的错误demo.sh: 5: Syntax error: "(" unexpected (expecting ... 阅读全文