Created attachment 206089 [details]
shar archive with port files
This is a small console utility that prints a random file name from given directory to standard output.
No offense, but what's the benefit of your tool compared to `find . -type f -maxdepth 1 | sort -R | head -n1` command line ?
The reservoir-sampling algorithm provide some benefits here ?
No offense taken. The reservoir-sampling algorithm will provide benefit for big directories, as it doesn't require sorting input data. For most cases find+sort will do just fine though.
I've created this port mainly for myself, so I can easily install this tool on my system. If you don't find this tool useful, I don't mind not including it is ports. I can always fallback to portshaker.
At this points just two remarks:
The algorithm used (reservoir-sampling) should be notified
in the package description.
And you should add a few words about the benefits of this
solution in the long description aka pkg-descr.
Created attachment 206553 [details]
shar archive with updated descriptions