#!/bin/bash
-
-# Author: Steven Baltakatei Sandoval (baltakatei.com)
-#
-# License: This bash script, `bknpass`, is licensed under GPLv3 or
-# later by Steven Baltakatei Sandoval:
-#
-# `bknpass`, an alphanumeric password generator
-# Copyright (C) 2021 Steven Baltakatei Sandoval (baltakatei.com)
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# A copy of the GNU General Public License may be found at
-# <https://www.gnu.org/licenses/>.
-#
-# Description: This bash script generates alphanumeric passphrases
-# with a char-count determined by a user-provided number of bits of
-# entropy. The passphrase is then outputted to stdout with a trailing
-# newline. It works as follows:
+# Desc: Generate alphanumeric passphrase with specified bits of entropy.
+# Usage: bknpass [int]
+# Example: bknpass 128
+# Depends: bash, echo, bc, awk, tr, head, Debian 10
+# Version: 0.1.0
+# Note: This bash script generates alphanumeric passphrases
+# with a char-count determined by a user-provided number of bits of
+# entropy. The passphrase is then outputted to stdout with a trailing
+# newline. It works as follows:
#
-# - Prompt user for an integer. This integer is the number of bits
-# of entropy that the generated password should have.
+# - Prompt user for an integer. This integer is the number of bits
+# of entropy that the generated password should have.
#
-# - Check if user-provided string is an integer using `bash` regular
-# expression test.
+# - Check if user-provided string is an integer using `bash` regular
+# expression test.
#
-# - Calculate the minimum number of bech32 base32 characters
-# required to encode the specified number of bits of entropy.
+# - Calculate the minimum number of bech32 base32 characters
+# required to encode the specified number of bits of entropy.
#
-# - This step uses `bc` to calculate a logarithm float string
-# and `awk` to convert the float into an integer, rounding up.
+# - This step uses `bc` to calculate a logarithm float string
+# and `awk` to convert the float into an integer, rounding up.
#
-# - Use `tr`, `/dev/urandom`, and `head` to generate a random
-# alphanumeric string with the length calculated in the previous
-# step.
+# - Use `tr`, `/dev/urandom`, and `head` to generate a random
+# alphanumeric string with the length calculated in the previous
+# step.
#
-# - Use `echo` to display the passphrase in stdout with a trailing
-# newline.
-#
-# Usage: bknpass [int]
-#
-# Example: bknpass 256
-#
-# Dependencies: bash, echo, bc, awk, tr, head. See end of file
-#
-# Tested on:
-#
-# - GNU/Linux Debian 10
+# - Use `echo` to display the passphrase in stdout with a trailing
+# newline.
#==Initialization==
# There is NO WARRANTY, to the extent permitted by law.
#
# Written by David MacKenzie and Jim Meyering.
+
+# Author: Steven Baltakatei Sandoval
+# License: GPLv3+