Created
October 29, 2013 10:05
-
-
Save shayelkin/7211895 to your computer and use it in GitHub Desktop.
Outputs N random lines from stdin.
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
#!/bin/sh | |
# | |
# Outputs $1 random lines from stdin. | |
# Sample usage: cat src_file | sort -R | head -n 100 | |
sort -R | head -n $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment