[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:
>  Riiiiggght.
>  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|_| ProgClub
|_|_|O| Because every programmer needs a good club!
|O|O|O| https://www.progclub.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jj5.vcf
Type: text/x-vcard
Size: 231 bytes
Desc: not available
URL: <http://www.progclub.org/pipermail/programming/attachments/20190619/5cb33c3d/attachment.vcf>

More information about the programming mailing list