#!/bin/bashbash
for USER in user{1..100} #變量USER從user1到user100開始循環,生成100個用戶ide
doit
if id $USER &>/dev/null #若是用戶存在class
then #而後變量
userdel -r $USER #刪除用戶循環
echo "$USER delete successful." #提示:用戶刪除成功di
else #而後view
echo "$USER already exit" #提示:用戶不存在vi
fico
done