bad substitution from windows command line

View: New views
5 Messages — Rating Filter:   Alert me  

bad substitution from windows command line

by sieg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 
I'm running cygwin bash on Windows XP at home and cygwin bash on Vista at
work.

I'm running groovy 1.6.1 at home.
 
Here is the command that works at home but not at work:

Code:
$ groovy -e " (new XmlSlurper().parse('languages.xml')).language.each {
println \"\${it.@name} authored by \${it.author[0].text()}\" } "
/cygdrive/c/Program Files/Groovy/Groovy-1.6.4/bin/startGroovy: line 229:
${it.author[0].text()}" } ": bad substitution

Now who is complaining about the substitution: bash or groovy?
 
Why is groovy complaining about a bad substitution? I escaped the "$" so
bash would ignore it and this works at home. I tried "\\$" but that did not
help!
 
Thanks,
Siegfried


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: bad substitution from windows command line

by Antti Karanta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> -----Original Message-----
> From: siegfried [mailto:siegfried@...]
>
>
> I'm running cygwin bash on Windows XP at home and cygwin bash on Vista
at
> work.
>
> I'm running groovy 1.6.1 at home.
>
> Here is the command that works at home but not at work:
>
> Code:
> $ groovy -e " (new XmlSlurper().parse('languages.xml')).language.each
{
> println \"\${it.@name} authored by \${it.author[0].text()}\" } "
> /cygdrive/c/Program Files/Groovy/Groovy-1.6.4/bin/startGroovy: line
229:
> ${it.author[0].text()}" } ": bad substitution
>
> Now who is complaining about the substitution: bash or groovy?

  bash. If you look at the mentioned file (/cygdrive/c/Program
Files/Groovy/Groovy-1.6.4/bin/startGroovy), it is a bash shell script.

  People have at various occasions complained about problems with the
groovy shell script launcher on cygwin. I have no experience of that so
this is hearsay.


  Anyway, using the native launcher may solve the issues you are seeing:

http://groovy.codehaus.org/Native+Launcher

  Please note that the precompiled binaries on the above page do not
have cygwin path support - you'll have to compile it yourself.



     ::Antti::




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: bad substitution from windows command line

by Jochen Theodorou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

siegfried schrieb:

>  
> I'm running cygwin bash on Windows XP at home and cygwin bash on Vista at
> work.
>
> I'm running groovy 1.6.1 at home.
>  
> Here is the command that works at home but not at work:
>
> Code:
> $ groovy -e " (new XmlSlurper().parse('languages.xml')).language.each {
> println \"\${it.@name} authored by \${it.author[0].text()}\" } "
> /cygdrive/c/Program Files/Groovy/Groovy-1.6.4/bin/startGroovy: line 229:
> ${it.author[0].text()}" } ": bad substitution
>
> Now who is complaining about the substitution: bash or groovy?
>  
> Why is groovy complaining about a bad substitution? I escaped the "$" so
> bash would ignore it and this works at home. I tried "\\$" but that did not
> help!

the bash is complaining. But I have no idea why it does

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: bad substitution from windows command line

by Joachim Baumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Antti,

for the installer I right now compile the native launcher using MSYS as
you described on groovy.codehaus.org. Does this suggest that it might
actually be better to compile a version using Cygwin?

Cheers, Joachim

Antti Karanta schrieb:

>  
>> -----Original Message-----
>> From: siegfried [mailto:siegfried@...]
>>
>>
>> I'm running cygwin bash on Windows XP at home and cygwin bash on Vista
>>    
> at
>  
>> work.
>>
>> I'm running groovy 1.6.1 at home.
>>
>> Here is the command that works at home but not at work:
>>
>> Code:
>> $ groovy -e " (new XmlSlurper().parse('languages.xml')).language.each
>>    
> {
>  
>> println \"\${it.@name} authored by \${it.author[0].text()}\" } "
>> /cygdrive/c/Program Files/Groovy/Groovy-1.6.4/bin/startGroovy: line
>>    
> 229:
>  
>> ${it.author[0].text()}" } ": bad substitution
>>
>> Now who is complaining about the substitution: bash or groovy?
>>    
>
>   bash. If you look at the mentioned file (/cygdrive/c/Program
> Files/Groovy/Groovy-1.6.4/bin/startGroovy), it is a bash shell script.
>
>   People have at various occasions complained about problems with the
> groovy shell script launcher on cygwin. I have no experience of that so
> this is hearsay.
>
>
>   Anyway, using the native launcher may solve the issues you are seeing:
>
> http://groovy.codehaus.org/Native+Launcher
>
>   Please note that the precompiled binaries on the above page do not
> have cygwin path support - you'll have to compile it yourself.
>
>
>
>      ::Antti::
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
>  

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



RE: bad substitution from windows command line

by Antti Karanta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> -----Original Message-----
> From: Joachim Baumann [mailto:joachim.baumann@...]
>
> for the installer I right now compile the native launcher using MSYS
as
> you described on groovy.codehaus.org. Does this suggest that it might
> actually be better to compile a version using Cygwin?

  Cygwin support can be enabled with any supported windows compilation
environment, it is just on by default in cygwin and off elsewhere. So
using msys is just fine.

  You can use the build parameter "cygwinsupport" to explicitly
enable/disable cygwin support (see
http://groovy.codehaus.org/Native+Launcher#NativeLauncher-PathsonCygwin)
:

e.g.

scons cygwinsupport=True


  Previously I did not consider it a good idea to include a cygwin
compatible native launcher in the windows installer as the stack
manipulation required to use cygwin1.dll from a non cygwin app is close
to black magic. I did some modifications so now that magic is performed
only when run from cygwin so I think the current version could be
included with cygwin support. Non-cygwinners should not experience any
difference, cygwinners will get cygwin path support out of the box.



     ::Antti::




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email