Mint Serena 64 bit using the Mate desktop environment. Most of the following scripts will run on this machine, although some have only been tested with the Gnome desktop. Extra software requirements can be met by the Ubuntu and safe PPA repositories. Scripts may be re-written or added to from time to time, the date serves as the version number. Syntax highlighting on these pages is provided by GVim's "Convert to HTML" option.

Password card.

# Filename:
# Version: 120212
# Author: robz
# Generates a random alpha-numeric text block for a password card.
# Just double click and run, the text block file will appear in the same 
# directory as the script.

DATEMARK=$(date +%d-%m-%y" @ "%H:%M:%S)
BLOCKLOC="$(dirname $0)/Passcard generated on $DATEMARK/Alphanumeric block.txt"

mkdir "$(dirname "$BLOCKLOC")"                      # Create a new directory.

for x in {1..8}; do                                 # Loop to create 8 lines.
    tr -cd [:alnum:] < /dev/urandom |\
    head -c 29 >> "$BLOCKLOC"                       # Write alpha-numeric line. 
    echo >> "$BLOCKLOC"                             # Move to next line.

echo -e "Generated $DATEMARK" >> "$BLOCKLOC"        # Date/time of generation.

No comments: