pdp320921 当前离线
一级士官
for /f "skip=1 tokens=2 delims=:" %%i in ('arp -a') do @echo %%i复制代码
评分人数
TOP
tmplinshi 当前离线
版主
for /f "tokens=2" %i in ('arp -a^|findstr :') do echo %i复制代码
for /f "tokens=2" %i in ('arp -a^|findstr /n .^|findstr 4:') do echo %i复制代码
for /f "tokens=2" %i in ('arp -a^|findstr /n .^|findstr 5:') do echo %i复制代码
....复制代码
for /f %i in ('arp -a^|findstr "mic 动"') do echo %i复制代码
for /f %i in ('arp -a^|findstr "tic 静"') do echo %i复制代码
for /f "delims=Interfac: " %i in ('arp -a^|findstr ": mic"') do @echo %i复制代码
for /f "tokens=2 delims=:-" %i in ('arp -a ^|findstr /c:"Interface"') do @echo %i复制代码
CrLf 当前离线
论坛巡查
@echo off&setlocal enabledelayedexpansion for /f %%i in ('arp -a') do ( set /a n+=1 set ip!n!=%%i ) set ip pause复制代码
@echo off SetLocal EnableDelayedExpansion set n= for /f "tokens=1-3" %%a in (' arp -a ') do ( if "%%a" == "Interface:" ( set /a n += 1 set IP_!n!=%%b ) else if "%%c" == "dynamic" ( set /a n += 1 set IP_!n!=%%a ) ) set IP_ pause复制代码
@echo off&setlocal enabledelayedexpansion for /f %%i in ('arp -a') do ( set /a n+=1 echo>!n!.txt %%i )复制代码