idccom 当前离线
列兵
评分人数
回家路上 当前离线
少尉
@echo off for /f "tokens=1,2* delims=." %%i in ('more +8 "%~f0"') do ( if not defined #%%i%%j echo;%%i.%%j.%%k set #%%i%%j=1 ) pause & exit /b复制代码
TOP
WHY 当前离线
上校
@if (0)==(0) echo off cscript //nologo //e:jscript "%~f0" < 1.txt pause & exit @end var reg = /^(\d+\.\d+)\.\d+\.\d+$/mg; var s = WSH.StdIn.ReadAll(), map = []; while(arr=reg.exec(s)){if(!map[arr[1]]){map[arr[1]]=1; WSH.Echo(arr[0])}}复制代码
@echo off PowerShell -c "type 1.txt | group {$_ -replace '\d+\.\d+$'} | %%{$_.Group[0]}" pause复制代码
gawk -F"." "!a[$1\".\"$2]++" 1.txt复制代码