I would call it, The command ... outputs a string
. 'Return' is a keyword, and the return value is a number, where 0 means by convention success (0 errors) and a different value indicates an error code.
You grab the output by:
result=$(google youtube post --access unlisted --category Tech $f)
but will often see the inferior solution:
result=`cmd param1 param2`
inferior, because backticks are easily confused with apostrophes (depending on the font) and hard to nest, so don't use them.
From 'man bash':
The return value of a simple command
is its exit status, or 128+n if the
command is terminated by signal n.
and:
return [n]
Causes a function to exit with the return value specified
by n. If n is omitted, the return
status is that of the last
command executed in the function body. If used outside a
function, but during execution of a
script by the . (source)
command, it causes the shell to stop executing that script
and return either n or the exit status
of the last command
executed within the script as the exit status of the
script. If used outside a function
and not during execution of a
script by ., the return status is false. Any command
associated with the RETURN trap is
executed before execution
resumes after the function or script.
The return value/exit code of the last command is gained through $?.
The keyword for the meaning you meant is command substitution. Again 'man bash':
Command Substitution
Command substitution allows the output of a command to replace the
command name. There are two forms:
$(command)
or
`command`
Bash performs the expansion by executing command and replacing the command substitution with the standard
output of the command, with any trailing newlines deleted. Embedded newlines
are not deleted, but they may be
removed during word splitting.
The command substitution $(cat file) can be replaced by the
equivalent but faster $(< file).
When the old-style backquote form of substitution is used,
backslash retains its literal meaning
except when followed by $, `,
or . The first backquote not preceded by a backslash terminates the
command substitution. When using the
$(command) form,
all characters between the parentheses make up the command; none
are treated specially.
Command substitutions may be nested. To nest when using the
backquoted form, escape the inner
backquotes with backslashes.
If the substitution appears within double quotes, word splitting
and pathname expansion are not
performed on the results.