不必使用临时文件- @echo off
- setlocal enabledelayedexpansion
- set /p z=请输入加减量:
- (for /f "tokens=1-3 delims=." %%a in (a.txt) do (
- set /a x=%%c-z
- set /a y=%%c+z
- if !x! lss 0 set x=0
- if !y! gtr 255 set y=255
- set line=%%a.%%b.!x!.0 %%a.%%b.!y!.255
- if not defined _!line! (
- echo,!line!
- set _!line!=1
- )
- ))>IPrangge+port.txt
复制代码
|