[ProgClub programming] Announcing rf.php and rnd()
John Elliot V | ProgClub
jj5 at progclub.org
Wed Jun 19 15:05:07 AEST 2019
On 19/6/19 2:47 pm, Jedd Rashbrooke wrote:
> So a one-line addition to /etc/profile.d/local-prefs.sh is how I'd
> solve that 'problem'
> *alias rufknsrs='ls | head -$(shuf -n 1 -i 1-$(ls | wc -l)) | tail -1'*
Yours is a specific solution. Mine is a general solution. Each has
different strengths and weaknesses. Mine is more code, but can be
readily adapted to more scenarios. Yours is less code, but is limited to
one mode of operation.
I for one am pleased to have my new facilities, even if you think
they're a bit silly. Now I can do a periodic network audit and
automatically pick a number of random servers and a number of random
files to verify my backups are working as expected. An activity I feel
is prudent, not that I'm expecting to find problems.
|_|_|O| Because every programmer needs a good club!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 231 bytes
Desc: not available
More information about the programming