정렬 래퍼을 배치 파일로 작성할 수 있습니다.
열을 임시 파일로 다시 정렬해야
을 정렬하고 다시 정렬하면됩니다. 정말 젭의 대답처럼, 필자는 TextDB tools 년 동안 크리스 LaRosa의 사용하고 있지만
REM *** Get the desired colum and place it as first column in the temporary file
setlocal DisableDelayedExpansion
(
for /F "tokens=1-3 delims= " %%A in (aux1.txt) DO (
set "par1=%%A"
set "par2=%%B"
set "par3=%%C"
setlocal EnableDelayedExpansion
echo(!par2! !par1! !par2! !par3!
endlocal
)
) > aux1.txt.tmp
REM ** Now sort the first colum, but echo only the rest of the line
for /F "usebackq tokens=1,* delims= " %%A in (`sort /r aux1.txt.tmp`) DO (
echo(%%B
)
출처
2012-04-16 10:34:27
jeb
감사합니다. 작동합니다! – vladCovaliov