[will@localhost ShellScript]$ cat for.sh#!/bin/sh
s=0for (( i=1; i<=10; i=i+1 ))do
s=$(($s+$i))doneecho "The result of '1+2+3+...+10' is ==> $s"
[will@localhost ShellScript]$
張貼留言
沒有留言:
張貼留言