[root@localhost rootCodeFiles]
#!/bin/sh
num=1
while [ $num -le 10 ]
do
SUM=`expr $num \* $num`
echo $SUM
num=`expr $num + 1`
done
[root@localhost rootCodeFiles]
[root@localhost rootCodeFiles]
#!/bin/sh
echo "please input username"
read username
echo "please input num"
read num
i=1
while [ $i -le $num ]
do
/usr/sbin/useradd $username$i
i=`expr $i + 1`
done
echo "please input password"
read passwd
j=1
while [ $j -le $num ]
do
echo $passwd | /usr/bin/passwd --stdin $name$j > /dev/null
j=`expr $j + 1`
done
[root@localhost rootCodeFiles]
[root@localhost rootCodeFiles]
#!/bin/sh
echo "please input username"
read username
echo "please input number of user you wanna delete"
read num
sum=1
while [ $sum -le $num ]
do
/usr/sbin/userdel -r $username$sum
sum=`expr $sum + 1`
done
[root@localhost rootCodeFiles]