title: Why can't I specify an environment variable and echo it in the same command line?
body: <p>Consider this snippet: </p>
  
  <pre><code>$ SOMEVAR=AAA
  $ echo zzz $SOMEVAR zzz
  zzz AAA zzz
  </code></pre>
  
  <p>Here I've set <code>$SOMEVAR</code> to <code>AAA</code> on the first line - and when I echo it on the second line, I get the <code>AAA</code> contents as expected. </p>
  
  <p>But then, if I try to specify the variable on the same command line as the <code>echo</code>:</p>
  
  <pre><code>$ SOMEVAR=BBB echo zzz $SOMEVAR zzz
  zzz AAA zzz
  </code></pre>
  
  <p>... I do not get <code>BBB</code> as I expected - I get the old value (<code>AAA</code>). </p>
  
  <p>Is this how things are supposed to be? If so, how come then you can specify variables like <code>LD_PRELOAD=/... program args ...</code> and have it work? What am I missing?</p>