+# The $cmd parameter can be:
+# -) a string
+# This is generally executed by passing it to the shell with the -c option.
+# However, it can be executed in one of two ways, depending on whether
+# there's a pipe involved:
+# *) with pipe: passed explicitly to bash -c, prefixed with:
+# set -o pipefail &&
+# *) without a pipe: passed to perl's open3 which uses 'sh -c'
+# (Note that this may result in two different syntax requirements!)
+# FIXME?
+# -) an array of arguments (strings)
+# Will be executed without interference from a shell. (Parameters are passed
+# as is, no escape sequences of strings will be touched.)
+# -) an array of arrays
+# Each array represents a command, and each command's output is piped into
+# the following command's standard input.
+# For this a shell command string is created with pipe symbols between each
+# command.
+# Each command is a list of strings meant to end up in the final command
+# unchanged. In order to achieve this, every argument is shell-quoted.
+# Quoting can be disabled for a particular argument by turning it into a
+# reference, this allows inserting arbitrary shell options.
+# For instance: the $cmd [ [ 'echo', 'hello', \'>/dev/null' ] ] will not
+# produce any output, while the $cmd [ [ 'echo', 'hello', '>/dev/null' ] ]
+# will literally print: hello >/dev/null