BEGIN{ FS=OFS="," Seed=1 } NR==1 { srand(Seed); } # Seed the random number generator. { x=int((rand()-0.00001)*3)+2 Header[NR]=$1 Data[NR]=$x #print $1,$x } END { #Header printf("#"); for (I=NR;I>1;I--) { printf("%s,",Header[I]) } # Now for I=1 (the KLOC), and the unknown actual effort printf("%s,actEffort\n",Header[1]) #Data for (I=NR;I>1;I--) { printf("%s,",Data[I]) } # Now for I=1 (the KLOC), and the unknown actual effort printf("%s,-1\n",Data[1]) }