read aa file=‘cat /etc/passwd |grep $aa‘ if [ -z $aa ] then echo "the user is not exist" useradd user$aa else echo "the user is exist" fi
不存在则创建用户 linux
原文:http://msjvssg.blog.51cto.com/10012551/1734399