This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: bash expands $1 in strange new way
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:
>
>> Â Â Â Âset EXPLOR='/cygdrive/c/windows/explorer.exe'
>
> does NOT set a variable named EXPLOR. ÂInstead, it sets the first
> positional argument ($1) to the string
> "EXPLOR=/cygdrive/c/windows/explorer.exe". ÂWhatever the old value of
> $1 was, it's now gone.
>
> To fix, get rid of the "set". ÂIn sh and derivatives, "set" sets the
> positional arguments (and optionally flags that affect the shell's
> behavior); it does NOT set variables. ÂJust use the assignment syntax
> (var=value) 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