hhnf333 发表于 2018-8-30 07:22:20

shell脚本实例之Charpter8-9

#!/bin/bash  
#charpter_8-9
  
#trap 'echo "Before executing the line: $LINENO,sum2=$sum2,sum1=$sum1"' DEBUG
  

  
declare -a array1
  
echo "Please input some integer numbers separated by SPACE:"
  
read -a array1
  
echo The length of array1 is: "${#array1[@]}"
  
let max="${#array1[@]}"
  
let sum_odd=0
  
let sum_even=0
  

  
fun()
  
{
  
   for ((i=0;i
页: [1]
查看完整版本: shell脚本实例之Charpter8-9