aboutsummaryrefslogtreecommitdiffstats
path: root/get-password
blob: 042f91e27dd7074a7c942f5f5613bb855f285e95 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# $Id: get-password 22580 2007-02-15 15:25:04Z guillomovitch $
# helper script for rpm scriptlets to get a random password

if [ -n "$1" ]; then
    length=$1
else
    length=8
fi

perl -e "@c = (a..z,A..Z,0..9); print map { @c[rand @c] } 0..$length"