思想之翼 当前离线
上尉
评分人数
77七 当前在线
中校
@echo off cd /d "%~dp0" for /l %%l in (1,1,10000) do ( cut -f %%l "a.txt" > "%%l.txt" findstr . "%%l.txt" 1>nul || (del "%%l.txt" & goto :next) ) :next pause复制代码
TOP
aloha20200628 当前离线
gawk -F "\t+" "{for(i=1;i<=NF;++i)print $i>>i\".txt\"}" a.txt复制代码
qixiaobin0715 当前离线
大校
@echo off for /f "delims=" %%i in (a.txt) do ( setlocal enabledelayedexpansion set str="%%i" set str=!str: =" "! for %%j in (!str!) do ( set /a n+=1 echo,%%~j>>!n!.txt ) endlocal ) pause复制代码
<# :: @echo off & powershell "iex(${%~f0}|out-string)" &pause&exit/b #> foreach($l in [io.file]::readlines('a.txt')) { $n=1; foreach($v in $l.split("`t")) { $f=''+($n++)+'.txt'; $v|ac $f } }复制代码