delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <f60fe000912242049t5248f366x4f077b57260961a6@mail.gmail.com> |
References: | <20091225031926 DOT GA8496 AT panix DOT com> <f60fe000912242049t5248f366x4f077b57260961a6 AT mail DOT gmail DOT com> |
Date: | Fri, 25 Dec 2009 00:06:07 -0500 |
Message-ID: | <a13b5a590912242106i687f812bi66a0d63093396a1d@mail.gmail.com> |
Subject: | Re: bash expands $1 in strange new way |
From: | Robert Pendell <shinji AT elite-systems DOT org> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On Thu, Dec 24, 2009 at 11:49 PM, Mark J. Reed wrote: > On Thu, Dec 24, 2009 at 10:19 PM, David Arnstein wrote: >> I have a bash shell script named xplo that worked as desired under >> cygwin 1.5. It fails under cygwin 1.7. > > Your shell script is incorrect, and I don't see how it worked under > 1.5. This line: > >> =C2=A0 =C2=A0 =C2=A0 =C2=A0set EXPLOR=3D'/cygdrive/c/windows/explorer.ex= e' > > does NOT set a variable named EXPLOR. =C2=A0Instead, it sets the first > positional argument ($1) to the string > "EXPLOR=3D/cygdrive/c/windows/explorer.exe". =C2=A0Whatever the old value= of > $1 was, it's now gone. > > To fix, get rid of the "set". =C2=A0In sh and derivatives, "set" sets the > positional arguments (and optionally flags that affect the shell's > behavior); it does NOT set variables. =C2=A0Just use the assignment syntax > (var=3Dvalue) by itself for that. > Of course I am too slow (by about 15 minutes). >.< -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |