Running simply builtin prints nothing and returns exit code 0. This is in accordance with help builtin, which shows all parameters as optional. But why isn't this no-op an error? Is there a use case ...
Here is a simple example showing that using declare in a script the script will not run, while sourcing the script will:
$ cat /tmp/new
declare -i hello
$ chmod a+rwx /tmp/new
Normally, bash is able to assign multi-line output of a command:
This works from both interactive shell and scripts. But it appears the output of a builtin can't be captured in a variable: