perl -lne"@A=split /,/; print join(q(,), @A[0 .. 3]) if 2 .. eof" temp.txt