I know that I can pass an env variable to a command by prepending it like this:
env_variable=value command
but today I accidentally put &&
between the variable and the command:
env_variable=value && command exactly
^
^
and I got curious how is it different to the correct way. I know that you can use &&
to chain commands together. But what's interesting is that the command didn't receive the variable, why? I'd be grateful if anyone explained how exactly the second variant is different from the first one and why the command didn't see the variable. Thanks
a += 2
ora *= 2
is the "correct" one. – Feb 19 '20 at 18:57