I'm new using environment variables and i'm testing how to pass and override environment vars to my scripts.
To test its behaviour, i've created a simple trivial script named testenv.sh as follow:
#!/bin/bash echo $COLOR So, when i run
$ env COLOR=RED ./testenv.sh I get the expected stdout RED.
However my question is, why if i run the following command
$ env COLOR=RED echo $COLOR I don't get the same result as above, in fact is a blank stdout.