Files
linux-scripts/random-gen
2023-08-04 03:57:19 -05:00

8 lines
174 B
Bash
Executable File

#!/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