I was thinking in how to include some metadata in my script files in a way that other scripts could process this information without interfering in its ./
execution.
YAML Front Matter came to my mind, but obviously its ---
syntax produce error either in #!/bin/bash
as in #!/usr/bin/python3
, for example.
./
execution?If you can't use a comment, you could use a Python object of some kind.
This is a bit like the way doctstrings work in Python: The string is an expression but it's evaluation doesn't have side effects and Python uses it as metadata.
However if you need a shebang (#!...
) that does have to come first. Your metadata processor will have to skip that line.