首页 > 其他分享 >第二周作业

第二周作业

时间:2022-10-30 16:31:53浏览次数:36  
标签:bin head cut grep tr 作业 第二周 inet

#!/bin/bash

ifconfig | grep inet | head -n1 | tr -s ' ' | cut -d" " -f3
ifconfig | grep inet | head -n1 | tr -s ' ' | cut -d" " -f3 | grep '3' > /dev/null
TEST=$(echo $?)
if [ $TEST -eq 0 ];then
date
else
for i in {0..100};do
useradd mageedu_$i
done
fi

cat /etc/passwd | grep '/bin/bash' | cut -d":" -f1
yum install -y nginx
systemct enable nginx
























标签:bin,head,cut,grep,tr,作业,第二周,inet
From: https://blog.51cto.com/u_15832229/5807532

相关文章