for循环:
#!/bin/bash
#Description:sum odd , sum even
#Author:fansik
#Script:second script
declare -i oddSum=0,evenSum=0
for odd in `seq 1 2 100`; do
oddSum=$[$oddSum+$odd]
done
for even in `seq 2 2 100`; do
let evenSum=$evenSum+$even
done
echo -e "The oddSum is $oddSum.
The evenSum is $evenSum."