[wpkg-users] question on http://wpkg.org/Cygwin

Tomasz Chmielewski mangoo at wpkg.org
Mon Jun 23 22:09:44 CEST 2008


Anon Sricharoenchai schrieb:
> On 6/22/08, Tomasz Chmielewski <mangoo at wpkg.org> wrote:
>>> === bash -c ===
>>>  <install cmd='c:\cygwin\bin\bash -c
>>> PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
>> /usr/bin/cyg-apt.py
>>> update' />
>>>
>>> Why not having quote surround bash command, like this?,
>>>
>>>  c:\cygwin\bin\bash -c
>>> "PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
>> /usr/bin/cyg-apt.py
>>> update"
>>>
>>  It shouldn't make a difference here.
>>  In both cases "update" would be passed as a positional parameter to
>> /usr/bin/cyg-apt.py.
>>
> 
> But from my experiment,
> 
>    $ bash -c /bin/echo update
> 
> bash -c without quote, doesn't recognize the remaining argument.

Indeed, it should be quoted.

I misread the manual, which states:

-c string If the -c option is present, then commands are read from 
string.  If there  are  arguments  after  the  string,  they  are
assigned to the positional parameters, starting with $0.



-- 
Tomasz Chmielewski
http://wpkg.org



More information about the wpkg-users mailing list