第二周作业


#!/bin/bash
IP () {
IPADDR=` hostname -I | cut -d' ' -f1`
echo "IPADDR:    $IPADDR "
if $IPADDR | grep '3' ;then
echo "time: `date +%F%n%T`"
else groupadd magedu;
         for i in {00..100};do
                      useradd mage_$i -g magedu ; echo mage_$i is created;
done
fi
echo -e "`grep -v '/sbin/nologin'$ /etc/passwd`";
}&
yum -y install nginx;
systemctl start nginx


posted @ 2023-06-11 21:06  痛要忍着  阅读(15)  评论(0)    收藏  举报