07 October 2009

Awk: Random number

Put random number into every line of data
awk 'BEGIN{srand()} {RAND=1+int(rand()*1000000); print RAND}' [file]

No comments:

Post a Comment