BEGIN {FS = "\t"; OFS = "\t";} { if (NR < (N + 1)) { for (i = 0;i<(per_max/per_min);i++) { printf("%s\n",$0); } } else printf("%s\n",$0); }