美文网首页
shell 脚本之 批量添加用户

shell 脚本之 批量添加用户

作者: __2387 | 来源:发表于2018-11-17 18:11 被阅读0次

#!/bin/bash

if [ $# -eq 0 ];then

        echo "Please provide the user roster file!"

        exit 1

fi

if [ ! -f ];then

        echo "Please refer to the correct roster file!"

        exit 2

fi

for i in $(cat $1)

do

        userdel -r $i

done

相关文章

网友评论

      本文标题:shell 脚本之 批量添加用户

      本文链接:https://www.haomeiwen.com/subject/mejifqtx.html