用awk中csv文件中取前1000行出来,代码虽少,很容易出错
BEGIN{ FS=","; OFS=","; i=0; } { i++; if(i>999)exit; print $1,$2,$3,$4,$5,$6 >> "smalldata.csv"; } END{ }
时间: 2024-12-28 01:29:48
用awk中csv文件中取前1000行出来,代码虽少,很容易出错
BEGIN{ FS=","; OFS=","; i=0; } { i++; if(i>999)exit; print $1,$2,$3,$4,$5,$6 >> "smalldata.csv"; } END{ }