您好,登錄后才能下訂單哦!
工作環境:Red Hat Enterprise Linux Server release 6.5 (Santiago) 、 bash
#!/bin/bash
#
for i in `seq -w 1 10`
do
echo "user$i添加成功"
read -s -p "input passwd:" pass
while [ ${#pass} -lt 6 ]
do
echo ""
read -s -p "input passwd error ,the number of passwd must bigger than 6:" pass
((count++))
if [ $count -gt 3 ];then
echo "f**k you "
exit
fi
done
echo "$pass"
read -p "want to del the user (yes/no):" choice
[ $choice == "yes" -o $choice == "y" ] && echo "del start"
[ $choice == "no" -o $choice == "n" ] && echo "don't del"
[ $choice != ^yes -o $choice != ^no ] && echo "please input (yes/no)!!!"
done
注意:只是簡單的示例,并不會添加和刪除用戶
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。