This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import os | |
import random | |
import sys | |
import argparse | |
parser = argparse.ArgumentParser(description = 'Print random lines from a file') | |
parser.add_argument('-n', dest='sample_size', type=int, help='number of lines to sample', default=100) | |
parser.add_argument('files', nargs=argparse.REMAINDER, help='files to read from') |
NewerOlder