不重复选人

#!/bin/bash
#Description:what is this
#Date: 2010-12-25 13:36:34
#Author:student
#Version:0.01
read -p "A number:" NU
GREEP=(haoyuan yue wei keqin yuchao huina xingya yupo)
GREEP1=(0 1 2 3 4 5 6 7)
until [ $NU -eq 0 ]; do
IND=$[$RANDOM%8]
if ! [ ${GREEP1[$IND]} -eq 8 ]; then
GREEP1[$IND]=8
echo "${GREEP[$IND]}"
let NU=$[$NU-1]
fi
done

你可能感兴趣的:(职场,休闲,1230)