shell免交互批量为服务器做些事情
passwd.txt 定义主机ip和密码
```bash
#!/bin/env bash
##this is don't interactive script
##author xw 2018.3.30
while read line
do
{
ip=`echo $line |awk '{print $1}'`
pass...
shell批量删除用户
```bash
#!/usr/bin/env bash
while read line
do
user=`echo $line |awk -F":" '{print $1}'`
shell=`echo $line |awk -F":" '{print $NF}'`
if [ "$shell" = "/bin/bash" -a "$user" !...
shell 统计80端口状态
```bash
#!/usr/bin/env bash
##this is web State Statistics script
##author xw 2018.3.28
declare -A state
Statistics=`ss -an |grep :80 | awk '{print $1}{print $2}{print $3}{print $4}'`
for p in...
shell脚本打印/etc/passwd
```bash
#!/bin/env bash
while read she
do
user=`echo $she |awk -F":""/" '{print $1}{print $2}{print $3}'`
username[++I]=$user
done < /etc/passwd
echo "username first: ${usernam...
shell脚本绑定网关
```bash
#!/bin/env bash
gw1=172.16.53.254
gw2=172.16.52.254
##this is Automatic binding gateway scripts
####author xw 2018.3.27
while :
do
ip route del default
ip route a...