Ho questo script e posso dividere enormi file txt in piccoli pezzi in formato Windows / DOS
Come posso apportare alcune modifiche per dividere in formato Unix?
@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