|
From: | Jan Schampera |
Subject: | Re: style of assignment to variable changes command selection |
Date: | Sat, 08 Mar 2008 11:20:28 +0100 |
User-agent: | IceDove 1.5.0.14pre (X11/20080208) |
Bob Proulx wrote: > This implies to me that a variable assignment forces subsequent > commands to be external commands because the current environment is > not affected. In your case above the external /usr/bin/time program > is forced by the variable assignment requiring the environment > variable set for it. I think the hint is in the difference of a (grammar-)"pipeline" and a "simple command". The variable assignment to change the environment of the called program is part of the simple command. The time keyword is part of the pipeline syntax. I think the correct way to do that is: time X=x foocommand since X=x time foocommand implies that this is a simple command. Jan
[Prev in Thread] | Current Thread | [Next in Thread] |