Name: badger Date: April 15, 2008 at 12:24:34 Pacific Subject: randomly select lines from a list OS: Mac OSX CPU/Ram: N/A Model/Manufacturer: mac
Comment:
Hi all,
I have a text file that has 142 lines each containing several columns. I'm trying to write a script that will randomly choose half of the lines, then write these to a new text file. So, the result would be a file similar to the original, but containing only 71 lines with none repeating. Any advice/help would be greatly appreciated.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE