#!/bin/bash
function adda()
{
#a=($*)
sum=0
for i in $*
do
((sum+=i))
done
return $sum
}
arr=(5 4 3 2 1 50)
adda ${arr[*]}
add=$?
echo $add
function A()
{
echo `id -u`
echo `id -g`
}
B=`A`
echo "uid和gid分别是:"$B
xmind