User Tools

Site Tools


doc:selectrandomlines

Select random lines

Tool version

2.0.1

Keywords

Selection, Lines, Random

Summary

Selects the desired number of random lines from a file.

Description

This tool selects random lines from a file. It generates no repeats and the order is preserved.

General comments (Warning/Tips)

None

Input

  • Randomly select: enter the number of lines to select.
  • from: select the input file.
  • Set a random seed: select the desired option:
    • Don't set seed
    • Set seed. If you choose this option, set the seed value by entering an integer. The seed will be used to set the starting point for generating the random lines. For a given dataset, if you choose the same seed, you will obtain the same random selection

Output

The output dataset contains random selected lines from the input dataset.

Example

Usage Example: selecting two random lines in a dataset.

Input

Randomly select: 2 lines

from: file_randomselection.txt

Set a random seed: Don't set seed

With file_randomselection.txt containing :

Output

Edited on

July 16th, 2014

doc/selectrandomlines.txt · Last modified: 2014/11/28 17:01 by slegras