Calculate the SHA-256 checksum of a readable file.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_hash_sha256_file

Purpose

Calculate the SHA-256 checksum of a readable file.

Arguments

  • $1 — File path.

Output

Prints the hex digest followed by a newline.

Returns

  • 0 when hashed; 2 for unreadable file; 3 for hashing errors; 127 if hashing tools are missing.

Usage

  sgnd_hash_sha256_file "/tmp/sgnd-demo.cfg"