发表于 2018-8-26 12:59:56

用shell实现打印600-700 之间的偶数

#!/bin/bash  
for i in {600..700}
  
do
  
count=`expr $i % 2`
  
if [ $count -eq 0 ]
  
then
  
out="$out $i"
  
fi
  
done
  
echo $out


页: [1]
查看完整版本: 用shell实现打印600-700 之间的偶数