Posts

Showing posts from November 24, 2018

Bulk data generation

Image
up vote 3 down vote favorite I need to generate nearly 1 Billion records of unique integers. I tried with awk but it is not generating more than 5million records. Below is what I had tried so far - awk -v loop=10000000000 -v range=10000000000 'BEGIN{ srand() do { numb = 1 + int(rand() * range) if (!(numb in prev)) { print numb prev[numb] = 1 count++ } } while (count<loop) }' But it is not generating more than 599160237 records and process got killed automatically awk regular-expression share | improve this question edited Nov 21 at 21:34 Rui F Ribeiro