You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#| => NAME — bind block content directly to $NAME without running a command.
#| must immediately follow a run of #> lines.
#$ header line: run a command independently (stdin from /dev/null) and
optionally bind the captured output to an environment variable.
#$ CMD ARGS... => NAME — run CMD; bind stdout to $NAME.
#$ CMD ARGS... — run CMD; stdout inherited (side effect).
The command is mandatory; omitting it is a parse error.
Both #| and #$ tokenise their command line identically to #: lines
(full quoting and variable substitution), excluding the trailing => NAME.
Trailing newlines are stripped from captured output, matching shell $(...).
Stderr from subcommands is inherited (passes through to the terminal).
New exit code 6 (EXIT_SUBCOMMAND_FAILURE) when a subcommand exits non-zero.
#| and #$ are forbidden inside --load-file files.
--dry-run suppresses subcommand execution.
Changed
All header effects (--chdir, --umask, --unset, #|, #$, environment
bindings) are now applied immediately and in order at header-processing time.
A subcommand can only see the options and bindings that precede it.
Security: scripts containing #| or #$ execute commands during script
loading, before the main interpreter is launched. Do not run herescript
scripts from untrusted sources.
--unset-undefined is now order-dependent: it must appear before the --unset directives it governs (previously documented as applying globally
regardless of order).