Bash script to generate random ascii string lines (printable characters only, including space) with lengths within a min-max range.

From: Amit
Date: Wed Jun 25 2025 - 03:35:01 EST


Bash script to generate random ascii string lines (printable
characters only, including space) with lengths within a min-max range.

--------------------------------------------------
#!/bin/bash

min=50
max=110

while true; do

len=`shuf -i $min-$max -n 1`

tr -dc '[:print:]' < /dev/urandom | dd ibs=$len count=1 status=none; echo

done
--------------------------------------------------