Header add field

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_header_add_field

Purpose

Add a metadata field to a named header section.

Arguments

  • $1 — FILE - File path.
  • $2 — SECTION - Header section name.
  • $3 — FIELD - Metadata field name.
  • $4 — VALUE - Value to read, validate, render, or store.

Returns

  • 0 on insertion or dry-run; 1 on temporary-file or replacement failure; 2 if the section is missing.

Usage

  sgnd_header_add_field "$source_file" Metadata Purpose "Show example"