Read a named section from a source-file header into a shell variable.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_header_get_section

Purpose

Read a named section from a source-file header into a shell variable.

Arguments

  • $1 — Source path.
  • $2 — Section name.
  • $3 — Name of the destination variable.

Side effects

Assigns section text to the named variable.

Returns

  • 0 on completion; consult the destination content to determine whether the section was present.

Usage

  sgnd_header_get_section "$source_file" Metadata metadata_text