1 Star 1 Fork 1

尹经阳/脚本文件

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
create_user.sh 330 Bytes
一键复制 编辑 原始数据 按行查看 历史
尹经阳 提交于 2023-02-13 15:30 +08:00 . 批量创建用户
#!/bin/bash
read -p "请输入要创建的用户:" user
read -p "要创建的个数:" num
count=0
echo "正在创建中》》》》"
if while [ $count -lt $num ]
do
let count+=1
useradd ${user}$count
echo ${user}$count | passwd --stdin ${user}$count > /dev/null
done;then
echo "$num$user用户已创建成功!!!"
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/yinjingyang/script-file.git
git@gitee.com:yinjingyang/script-file.git
yinjingyang
script-file
脚本文件
master

搜索帮助