Linux的shell编程——while的使用

ecode=1000
while [ $ecode -le 1002 ]
do
echo "please enter employee info ecode=$ecode"
echo "Enter name:"
read name
echo "Enter Emial:"
read email
#重定向到文件employee.dat
echo "Name:$name Email:$email" >>employee.dat
((ecode=$ecode+1))
done

你可能感兴趣的:(Linux)