You can set a variable for a single command like this:
MY_VARIABLE=my_value ./my_script.sh
You can hand off to another script like this:
exec ./my_script.sh
But when I try to do both like this:
exec MY_VARIABLE=my_value ./my_script.sh
I get an error:
exec: MY_VARIABLE=my_value: not found
Why is that?
Is there any way to do this?