我有这个脚本,可以将巨大的 txt 文件拆分成 Windows/DOS 格式的小块
我怎样才能对 Unix 格式的 split 进行一些更改?
@echo off
setlocal enableextensions disabledelayedexpansion
set "nLines=2000"
set "line=0"
for /f %%a in ('type total.txt^|find /c /v ""') do set "fileLines=%%a"
< "total.txt" (for /l %%a in (1 1 %fileLines%) do (
set /p "data="
set /a "file=1+line/%nLines%", "line+=1"
setlocal enabledelayedexpansion
>>"pass!file!.txt" echo(!data!
endlocal
))
endlocal