From a244c779f5fd0e9db04f4b119844771205078751 Mon Sep 17 00:00:00 2001 From: Allen <63997543+aaw3@users.noreply.github.com> Date: Fri, 4 Aug 2023 03:57:19 -0500 Subject: [PATCH] Added random-gen --- random-gen | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 random-gen diff --git a/random-gen b/random-gen new file mode 100755 index 0000000..4cb4f00 --- /dev/null +++ b/random-gen @@ -0,0 +1,7 @@ +#!/bin/bash + +# Would produce x2 the length provided +# openssl rand -hex $1 + +LENGTH=$1 +tr -cd '[:alnum:]' < /dev/urandom | fold -w "${LENGTH}" | head -n 1 | tr -d '\n' ; echo