Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
latkin
on Oct 17, 2015
|
parent
|
context
|
favorite
| on:
How to Shuffle and Sample on the Command-Line
On Windows, Get-Random handles the basic cases nicely
> 1..100 | Get-Random 72 > 1..100 | Get-Random -count 3 16 96 56
but doesn't have something like -r to resample. Or a nice way to simply shuffle the whole collection (workaround is to just pass -count as large or larger than the collection).
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: