#!/bin/bash

Usage: ./generate_ips.sh 192.168.0

if [ -z '$1' ]; then echo 'Please provide IP network address: e.g. 192.168.0' exit 1 fi

network='$1' for i in {1..254} do ip_address='$network.$i' echo $ip_address >> test_ip.txt done

echo 'IP addresses generated and saved to test_ip.txt file.'

Shell 脚本生成指定网段 IP 地址并保存到文件

原文地址: https://www.cveoy.top/t/topic/n1Te 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录