#!/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
#!/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
网友评论