batman 当前离线
考官
荣誉版主
TOP
weichenxiehou 当前离线
上尉
@echo off&setlocal enabledelayedexpansion ::将下面的[tab]改为实际的跳格键 set "tab=[tab]" for /f "delims=" %%a in (a.txt) do ( set "str=%%a" for /l %%b in (1 1 50) do ( for /f "delims=%tab%" %%c in ("!str!") do set "_%%b=!_%%b!批%%c"&set "str=!str:*%tab%=!" ) ) echo,与前面列存在重复的列有: for /f "tokens=1* delims==" %%h in ('set _') do ( if "!%%i!"=="a" set "var=%%i"&echo,第%%h列:!var:批= !" set "%%i=a" ) pause>nul复制代码
评分人数
terse 当前离线
中将
@echo off&setlocal enabledelayedexpansion set "Tab= "这里改为跳格键 for /f "delims=" %%i in (_a.txt) do ( set "str=%%i" set n= for %%j in ("!str:%Tab%="%Tab%"!") do ( set /a n+=1 for %%k in (!n!) do set l_%%k=!l_%%k!%Tab%%%j ) ) for /l %%i in (1 1 %n%) do ( for %%j in (!l_%%i!) do ( set "var=!l_%%i:*%%j=!" if "!var!" neq "" if "!var!" neq "!var:*%%j=!" set "Tem=!Tem! %%~j" ) if defined Tem echo %%i列:!Tem!&set Tem= ) pause复制代码
CrLf 当前离线
论坛巡查
@echo off&setlocal enabledelayedexpansion for /f "tokens=1* delims=:" %%a in ('findstr /n .* a.txt') do ( set /p=第%%a行: <nul set tmp=%%b for %%c in ("!tmp: =" "!") do ( if "!.%%a%%c!"=="" (set ".%%a%%c=.") else set /p=%%~c <nul ) echo; ) pause复制代码
@echo off&setlocal enabledelayedexpansion set "Tab= "这里改为跳格键 for /f "delims=" %%i in (a.txt) do ( set "str=%%i" set "str="!str:%Tab%="%Tab%"!"" for %%j in (!str!) do ( set "var=!str:*%%j=!" set "var1=!var:*%%j=!" if "!var!" neq "" if "!var!" neq "!var1!" set "Tem=!Tem! %%~j" ) echo!Tem!&set Tem= ) pause复制代码
随风 当前离线
要求找出各自相同的列组合并输出其共同的内容