批量创建10个系统帐号oldboy01-oldboy10并设置密码,密码为随机数,要求字符和数字等混
#!/bin/shfunctiongetpassword{##产生随机密码if[-n"$1"]thenlength=$1elselength=8fichars='abcdefghijkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789'charlength=echo$chars|wc-m|sed's#^[\t]##g'pw=''fornninseq${leng