1、实例n.sh#!/bin/shN=$1if [ -z $1 ];thenecho Usage $0 numexit 0fi for (( i=1;i<=N;i++));do((sum=i*i))echo $sumdone2、./n.sh 5