From 19a61078d68d6c69b63c1ad821f23bd9eba72eeb Mon Sep 17 00:00:00 2001 From: Mid Favila Date: Wed, 26 Jan 2022 14:35:48 -0400 Subject: [PATCH] add rand --- README | 3 ++- TODO | 3 +++ rand | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 rand diff --git a/README b/README index f05700d..4536d62 100644 --- a/README +++ b/README @@ -12,4 +12,5 @@ modem-manager - used to manage laptop PCIe WAN modems. rather dense netsh - an old experiment that serves as a simple TUI for managing network interfaces... and an example of how not to use AWK plumber - one of my more sophisticated scripts; plumber creates pipes between programs based on what sort of input it receives, and handles errors (somewhat) intelligently bach - the Batch Audio Conversion Helper uses FFMPEG to convert large numbers of files at once -invcli - Invidious CLI client. I hacked this together in like an hour and a half, so it's kind of rough at the moment, but it does work! \ No newline at end of file +invcli - Invidious CLI client. I hacked this together in like an hour and a half, so it's kind of rough at the moment, but it does work! +rand - One-liner that generates pseudorandom numbers using dd and od. \ No newline at end of file diff --git a/TODO b/TODO index fda356d..9e77b9f 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,6 @@ +General + -Move useful functions like rand() to their own files, to be used like libraries. + Links -Figure out a way to convert bookmarks to a textfile on exit and from the same on start, to facilitate sharing between machines diff --git a/rand b/rand new file mode 100755 index 0000000..f73a7fd --- /dev/null +++ b/rand @@ -0,0 +1,3 @@ +#!/bin/sh -e + +dd bs=2 count=1 if=/dev/random 2>> /dev/null | od - | sed -ne 's& *& &gp' | cut -d ' ' -f2