Revision: 44900
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 20, 2011 15:44 by ksaver
Initial Code
#!/usr/bin/env bash
# randpass.sh
# Generate semi-aleatory passwords from command line.
# Usage:
# ./randpass.sh [NN]
# "NN" is an optional positive integer.
# Default length: 20
if [ -z "$1" ]
then
LEN=20
else
LEN=$1
fi
echo $(< /dev/urandom tr -cd 'a-zA-Z0-9\<>!".$%&/()=?|@#[]{}-_.:,' \
| head -c $LEN)
Initial URL
Initial Description
Example:
$ randpass.sh 32
R"}I3$XzdsC0@KnjjA&U"M4$"lRLkIB@
$ for i in {1..10}; do randpass.sh; done
H,Cqby/2345UgyLWej5k
YV@{N{D<Tb<AtoqEa6t<
iz)!CL,y=(f/6!|3]8d=
Cjx09BT|?)W}_#q:KI(t
V](cO_1F]$Iq@h!2A"]]
PSO-2lp#>/FI=0DfSI]k
e?PrxzL_Q)ZcXr.YdOpr
ZLDU|x9kLmIcD-tEC9{t
|MD.VV)jck3B:9QR&mkG
1/bg&Iy?skZL9EMUxi3)
Initial Title
randpass.sh: Generate semi-aleatory passwords from command line.
Initial Tags
Initial Language
Bash