• kbal@fedia.io
    link
    fedilink
    arrow-up
    5
    ·
    9 hours ago

    Generate Random Numbers

    I prefer to generate random words (mostly for generating passwords):

    alias randword='head -$[$SRANDOM % `wc -l /usr/share/dict/words | cut -f1 -d" "`] /usr/share/dict/words | tail -1'
    
    • Ooops@feddit.org
      link
      fedilink
      arrow-up
      3
      ·
      7 hours ago

      The ‘random numbers’ I mostly generate are UUIDs…

      which can indeed be done nicely in the terminal by just reading directly from the kernel’s rng at /proc/sys/kernel/random/uuid