delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type; q=dns; s=default; b=xGhJzr | |
d8FMyTmb77NTBrGoE9lA6b7FizxkeTrGDopeGpWAcl0k1XjrpMYl1w5K4/HAHe0O | |
0CNliI+a9HE0ruclVoqJLDafyTzZnRGnhluo4nlqMXcW8J1tBPzVB78BULPFbLGz | |
9f84J6m/e/0FYa78wKZ3uJDVbsJg9lRvPEK/g= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type; s=default; bh=ysKCA04XUf3A | |
i+mBPMIH7PZsYR0=; b=ycT0ZUUH0c2f4kLrU1IybZ90ZlVVTb0PyXXSO2M3LvVo | |
f3jMHczacx/zQEVt8mARrZkR8lG93zwZ74iNcyBSpW4m6dzutssobR/Awx1KCDcO | |
MH7QggDHysP6fn565mZmonBsorLA8e/IiowRk5Y3cM+lrxyoN9Tm6v/BXwDZG/w= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-0.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 |
X-HELO: | mx1.redhat.com |
Message-ID: | <52B11F9C.9050100@redhat.com> |
Date: | Tue, 17 Dec 2013 21:07:56 -0700 |
From: | Eric Blake <eblake AT redhat DOT com> |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Change in behavior of bash / if [ |
References: | <6CF2FC1279D0844C9357664DC5A08BA21F8C0A AT MLBXV06 DOT nih DOT gov> |
In-Reply-To: | <6CF2FC1279D0844C9357664DC5A08BA21F8C0A@MLBXV06.nih.gov> |
OpenPGP: | url=http://people.redhat.com/eblake/eblake.gpg |
X-IsSubscribed: | yes |
--hRv6IGb7MqkQPuliG0XUQeCfv1OjKimxl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/17/2013 08:02 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote: > Today, a script that I use every day stated giving me the following > error message. (I grant that it might have started earlier and I > didn't notice.) Note that although it gave the error message, the > script seems to still have worked. >=20 > ./lddir: line 77: [: too many arguments >=20 > Line 77 was as follows. I'm testing whether $1 is "clip". >=20 > if [ x$1 =3D xclip ] What was $1 at the time? >=20 > I fixed it with this. >=20 > if [ "x$1" =3D xclip ] Yes, this is the correct fix for the improper quotation of the earlier example. >=20 > 32-bit, everything was up to date. >=20 > I've solved my problem, but the change was unexpected and, for me, > inexplicable, so I thought that I'd report it. Your quoting error would produce the same message on Linux; it is not cygwin-specific. >=20 > Let me know if you want/need more information. Without knowing how $1 was set, I can only guess that it contained something with characters in $IFS and therefore the word-splitting of the unquoted use caused too many arguments to [. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hRv6IGb7MqkQPuliG0XUQeCfv1OjKimxl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSsR+cAAoJEKeha0olJ0Nq1zoH/ROCkDXRSGYncgBdwrJEOXRz AAa6ecKTTEkxD5aFrSeF09K44TWwGgAEeBxJ9gHKVpXyxozRwStfBoErinJnKUOO I9pi3AqXXHWboij41pAIGdTwy5pQq4/YEGaZI1/8IS28fcQwA34Q4wXiPvYScMV5 IrOSDgO7hiINbF+YC8rS0KfKK5l47hbx0V3HF1pIa5SZ0JJkv4MTdWmyFabnVtOk uM/OfgWOo3CEPlfJR/fhJKfvL9E6xj75A0gfDiPns+TwC8Na8Ec8Sn1H+BmTYAwo EGUfL1LJURmjAf47BRc7xz4tXfiJC3LZ31FOm4nquhFMVDTP1nLvRwsFX7VF/HM= =7qRt -----END PGP SIGNATURE----- --hRv6IGb7MqkQPuliG0XUQeCfv1OjKimxl--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |