-n, --head-count
Output at most COUNT lines.
An option of shufx.
Usage
shufx -n COUNT [FILE]
shufx --head-count=COUNT [FILE]Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-n | --head-count | COUNT | output at most COUNT lines |
Examples
Pick three random lines
shufx -n 3 names.txtPick one of several words
shufx -e -n 1 red green blueRoll a die five times (numbers may repeat)
shufx -i 1-6 -r -n 5Pick a random file from a NUL-separated list
find . -type f -print0 | shufx -z -n 1Sample 100 lines for a quick look at a large log
shufx -n 100 access.log > sample.logShuffle in the portable gnux shell
gnux shell -c 'lsx -1 | shufx -n 2'Help in the terminal
gnux help shufx --head-count