Better variable quoting in passwd-gen.sh.
authorW. Trevor King <wking@drexel.edu>
Thu, 8 Dec 2011 16:01:01 +0000 (11:01 -0500)
committerW. Trevor King <wking@drexel.edu>
Thu, 8 Dec 2011 16:01:01 +0000 (11:01 -0500)
commit502261e5c17d9cd974737a23c4626e09c99689bc
tree51f85626c6bb63034aa8335991bed4d363d48ec2
parenta339769e77c74747ea068a007fce107a483049bc
Better variable quoting in passwd-gen.sh.

With the previous version, the unquoted `SET` passed to `tr` could
cause problems if Bash exapanded it to a filename.  Now everything is
nicely quoted, using braces and everything.  I also use
`${paramter:-word}` for all the configuration variables, which makes
it easy to override them without editing the script.  For example, you
can now run:

  $ DEVICE=/dev/urandom SET="[:alnum:][:punct:]" passwd-gen.sh 10
posts/passwd-gen.mdwn
posts/passwd-gen/passwd-gen.sh