Skip to content

Instantly share code, notes, and snippets.

@acallaghan
Created January 11, 2012 11:33
Show Gist options
  • Save acallaghan/1594272 to your computer and use it in GitHub Desktop.
Save acallaghan/1594272 to your computer and use it in GitHub Desktop.
Produce a file using random lines of another
cat file.csv | ruby -ne 'print if rand < 0.05' > random_lines.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment