-->
当前位置:首页 > 题库

主观题:h4.编写shell 程序,实现自动删除50 个账号的功能。账号名为stud1 至stud50。

Luz4年前 (2022-10-05)题库249
4.编写shell 程序,实现自动删除50 个账号的功能。账号名为stud1 至stud50。







答案:参考程序:

#!/bin/sh

i=1

while [ $i -le 50 ]

do

userdel -r stud${i}

i=$(($i+1 ))

done