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,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Message-ID: <49F991E6.4070606@byu.net> Date: Thu, 30 Apr 2009 05:56:22 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, kbrown AT cornell DOT edu Subject: Re: Bash problem References: <49F98B26 DOT 2070007 AT cornell DOT edu> In-Reply-To: <49F98B26.2070007@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Ken Brown on 4/30/2009 5:27 AM: > A build script I was running failed because it had a command of the form > 'eval foo=bar time '. Here's a simple test case: This is not cygwin specific. > > $ eval foo=bar time true > -bash: time: command not found > > It works fine without foo=bar: > > $ eval time true > > real 0m0.060s time is a special case. It is BOTH a bash reserved word and an external command (assuming you've installed the external package). The difference is what syntax you use. $ time true # bash builtin $ time foo=bar true # bash builtin $ \time true # external $ foo=bar time true # external Adding eval in the mix does not change the syntax qualities; time is only treated as the bash reserved word if it occurs FIRST in the pipeline (no variable assignments may precede it). - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkn5keYACgkQ84KuGfSFAYCzuACgx8oyaFaTBZpPChZDTVmLTdxg caIAoNZtWZ0MUazOs5K+H9YfKdxochOi =tEAe -----END PGP SIGNATURE----- -- 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/