Read YAML from Shell: Validate a Port and Run a Command Without eval
Read a typed YAML port with Python and PyYAML, reject invalid inputs, and pass SERVER_PORT to a child command without eval or shell-code generation.
linux / bash / parse↗
Practical notes on Java, Spring, testing, and software engineering, with working examples and source references.
Read a typed YAML port with Python and PyYAML, reject invalid inputs, and pass SERVER_PORT to a child command without eval or shell-code generation.
Fix the non-standard function keyword warning, choose POSIX sh or Bash explicitly, and test quoted arguments and function return codes.
Read a GitHub latest release and select one Temurin Linux x64 asset. Fail on HTTP errors, malformed JSON, and missing or ambiguous assets.
Compare dotted numeric versions without fixed-width packing. Handle trailing zeros, long components, invalid inputs, and explicit exit statuses.