when I execute the following command directly:
root@busybox-694d76bb5d-2gcvh:/# mysql -hmariadb -P3306 -uroot -ppassword -e 'SELECT 1'
I get the following output:
mysql: [Warning] Using a password on the command line interface can be insecure.
+---+
| 1 |
+---+
| 1 |
+---+
However, the same command in a subshell, like so:
$(mysql -hmariadb -P3306 -uroot -ppassword -e 'SELECT 1')
outputs:
mysql: [Warning] Using a password on the command line interface can be insecure.
bash: 1: command not found
why does bash interprets the "1" I send as an argument as if it was a separate command when it is sent in a subshell?