第二周作业

#!/bin/bash

ip=$(ifconfig eth0|sed -n '2p'|awk '{print $2}')
echo IP=$ip

if [[ $ip=*"3"* ]] ; then
echo $(date +%F%n%T)
else
groupadd magedu
for a in {1..100};do
useradd magedu_$a -g magedu
done
fi
cat /etc/passwd |grep -v /usr/sbin/nologin |cut -d: -f1
yum install -y nginx
systemctl start nginx

 

posted @ 2022-11-26 20:53  tgycaghujkl  阅读(28)  评论(0)    收藏  举报