给网卡配置10个临时ip地址,但是不配置192.168.17.15这个ip

#!/bin/bash
for i in `seq 10 20`;do
        if [ $i -eq 15 ];then
                continue
        fi
        ifconfig eth0:$i 192.168.18.$i netmask 255.255.255.0 up   ##up可以换成$1,然后传入参数 up|down
done

 

相关文章:

  • 2022-02-07
  • 2021-10-06
  • 2021-06-17
  • 2021-09-21
  • 2021-11-23
  • 2022-12-23
  • 2021-10-25
猜你喜欢
  • 2021-09-01
  • 2022-12-23
  • 2021-09-26
  • 2022-01-04
  • 2021-07-07
  • 2021-11-11
  • 2022-02-11
相关资源
相似解决方案