]> git.sur5r.net Git - bacula/bacula/blob - bacula/autoconf/randpass.awk
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / bacula / autoconf / randpass.awk
1
2 #   Dumb little AWK program to convert random decimal
3 #   values generated by rand.bc into passwords from the
4 #   character set defined below as "charset".
5
6 BEGIN {
7     charset = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
8     for (i = 0; i < length(charset); i++) {
9         set[i] = substr(charset, i, 1)
10     }
11 }
12     { printf "%s", set[$1 % length(charset)] }
13     
14 END { printf "\n" }