一个什么都学的老程序员  
C#和PHP学习历程
#!/bin/bash
                                                                                                                                              
                                                                                                                                              
echo "*****************"
echo       欢迎使用
echo "1.添加用户"
echo "2.退出操作"
echo "*****************"
echo "请选择:"
read again
                                                                                                                                              
while [ $again -eq 1 ]
do
echo ==============================
echo "请输入您希望创建的用户的个数";read num
cd /home
let x=1
while [ $x -le $num ]
do
echo ====================
echo "请输入第$x个用户名";read name
useradd $name
echo ========================
echo "请输入第$x个用户的密码"
passwd $name
let x=x+1
done
echo "*****************"
echo "1.继续添加用户"
echo "2.退出操作"
echo "*****************"
echo "请选择:"
read again
done
echo =============================
echo Thank for use, Goodbye ^_^
echo =============================


posted on 2006-11-23 13:06  剑落飘香  阅读(190)  评论(0编辑  收藏  举报