#!/usr/bin/env bash
# Desc: Create and sign a checksum
+# Usage: bksum file.txt
# Input: stdin: file list (newline delimited)
# arg(s): file paths (IFS delimited)
# Output: file containing sha256 hashes and file paths
# Depends: GNU-coreutils 8.30 (cat)
cat <<'EOF'
USAGE:
- bksumsign.sh [ options ] [FILE...]
+ bksum [ options ] [FILE...]
DESCRIPTION:
Creates sha256 checksum of files.
Indicate end of options.
EXAMPLE:
- bksumsign.sh file.txt
- bksumsign.sh file1.txt file2.txt
- bksumsign.sh -v -- file1.txt file2.txt
- bksumsign.sh -v -t -- file1.txt file2.txt
- find . -type f | bksumsign.sh
- find . -type f | bksumsign.sh -v -s -t -- file.txt
+ bksum file.txt
+ bksum file1.txt file2.txt
+ bksum -v -- file1.txt file2.txt
+ bksum -v -t -- file1.txt file2.txt
+ find . -type f | bksum
+ find . -type f | bksum -v -s -t -- file.txt
NOTE:
If GNU Coreutils 8.32 `sha256sum` used, checksum file
vbm "DEBUG:showVersion function called."
cat <<'EOF'
-bksumsign 0.0.1
+bksum 0.0.1
Copyright (C) 2022 Steven Baltakatei Sandoval
License GPLv3: GNU GPL version 3
This is free software; you are free to change and redistribute it.