for 的问题在于:空值被忽略,不是 token 数量的问题
和 csv 语义不同,所以不适合 用 批处理的 for 语句,用 awk ,powershell- set _str_=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48
-
- for /f "tokens=1,14,26,* delims=," %%a in ( "%_str_%" ) do (
- for /f "tokens=12,14,16 delims=," %%e in ( "%%d" ) do (
- echo %%a,%%b,%%c,%%e,%%f,%%g
- )
- )
复制代码
|