style of assignment to variable changes command selection
From:
Doug McIlroy
Subject:
style of assignment to variable changes command selection
Date:
Fri, 7 Mar 2008 21:17:47 -0500
These two bash sequences are not equivalent.
My intuition and the bash man page tell me they should be the same.
% export X=x; time --version; unset X
-bash: --version: command not found
% unset X; X=x time --version
GNU time 1.7
Behavior observed in:
GNU bash, version 3.2.33(18)-release (i686-pc-cygwin)
GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu)