X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <49F98B26.2070007@cornell.edu> References: <49F98B26 DOT 2070007 AT cornell DOT edu> Date: Thu, 30 Apr 2009 10:09:35 -0400 Message-ID: Subject: Re: Bash problem From: "Mark J. Reed" To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Thu, Apr 30, 2009 at 7:27 AM, Ken Brown > A build script I was running failed because it had a command of > the form 'eval foo=bar time '. That won't work because time is a special shell keyword, and as such only recognized when it's the first word on the command line. The same is true of all shell syntax-driving keywords such as "case", "for", "while", etc. (But not for simple built-in commands, which can appear anywhere the name of an actual command program on disk can). > I have access to a linux system in which the original command > (with foo=bar) works. That just means that the Linux system has the standalone time(1) command installed. As it happens, my Cygwin install also has a /bin/time. You can just move the assignment to after the 'time': eval time foo=bar env | grep foo real 0m0.120s user 0m0.000s sys 0m0.078s foo=bar -- Mark J. Reed -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/