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