passcard /

Filename Size Date modified Message
1.2 KB
1.1 KB

AWK implementation of

A simple shell/awk script for printing a password card to the console.
Echo one integer seed value per line as standard input to this script.
Pass the -s or -0 flag to print symbol or digit characters as well.


For example, this seeds the RNG with the current time in nanoseconds:
date +%N | ./passcard

An empy line as input will seed the script with the current time (in seconds):
echo | ./passcard

This also means you can start the script without piping input to it
and just press enter to print a new password card.

Print digits on the bottom half of the card and use digits/symbols:
./passcard -d -s
(Press enter for a new card, press ^D to stop.)

Using /dev/random for a random 32-bit seed value:
dd if=/dev/random bs=4 count=1 2>/dev/null | od -t u4 |
    awk 'NR == 1 { print $2 }' | ./passcard


You will need a UTF8-aware terminal along with a font that defines the used
Unicode characters.

You can't seed the script with a random value you got from
and expect to get the same password card printed.

Non-numeric input is ignored and acts the same as a blank line.

Justin Davis
jrcd83 at gmail dot com