This simple program reads in a data file and randomly selects records according to the given argument. It writes these records unchanged into the output file. The program assumes that each record corresponds to one line.
The program is called from the command line with one of the following argument lists
python randomselect.py
in_file out_file
-perc
percentage_value
python randomselect.py
in_file out_file
-num
num_records
-perc
percentage_value
-num
num_records