xset
ARES System Manual: xset Utility

xset <variable> <command>: runs <command> and stores the output in the specified environment variable
xset -q <variable> <command>: as above, but stops immediately once the job ends, even if no output has been received

xset is a standalone program that redirects the output pipe from another command into an environment variable for later manipulation in a shell script.

Environment variables are stored in the database section (JSON-formatted LinksetData entry) env.

This command is required for version comparison in many .pkg installer scripts, and is included with all versions of ARES.

By default, xset closes its pipe after receiving both the job termination receipt and at least one pipe message. This is necessary because sending output is slower than sending the termination message.

The -q switch will usually cause xset to terminate the pipe before output is received, but allows for greater compatibility with UNIX-style 'silent default' programs if they are slow to exit.

Messages sent to non-extant pipes are redirected via chat channel 0 (as though the pipe's unique identifier was that of an avatar) by the io daemon, which usually means they are unrecoverable.

xset is intended for use with short messages, typically no more than one buffer in length. Jobs that yield multiple print() statements may have the last truncated unless they wait before resolving.