Run bash script in cmd with cygwin

Ulrich Pogson grapplerulrich@gmail.com
Wed Sep 25 22:17:00 GMT 2013

Hi Andrey,

I am sorry I don't fully understand. I am a beginner try to get
something to work. What I am doing is that after pulling the .po I
need to create a .mo file.
https://github.com/AtelierConvivialite/webtranslateit/blob/master/examples/.wti#L11

On 25 September 2013 23:34, Andrey Repin <anrdaemon@yandex.ru> wrote:
> Greetings, Ulrich Pogson!
>
>>>> I would like to run this script for file in find . -name "*.po" ;
>>>> do msgfmt -o ${file/.po/.mo}$file ; done in windows cmd.
>>>
>>> I think you mean "command line" and not a "script".
>>> This is not realistically possible. Windows CMD do not have as straightforward
>>> quoting and escaping rules, as you might wish for it to have.
>>> Your only safe bet is to actually write a script and execute it from cmd, when
>>> need.
>>>
>>>> The script need to run in a different folder. I have been able to run it
>>>> though cygwin but want to integrate it with another system where it will be
>>>> run through cmd.
>>>
>>>> C:\cygwin\bin
>>>> D:\path\to\dir
>>>
>>>> How can I do this?
>>>
>>> The association:
>>>
>>> FTYPE unixshell.script="%CygwinDir%\bin\env.exe" "%1" %*
>>> ASSOC .sh=unixshell.script
>>>
>>>
>>> #! /bin/sh
>>> for file in $(find . -name "*.po") >>> do msgfmt -o${file/.po/.mo} \$file
>>> done
>
>
>> I got it to work with this line.
>> I: & cd I:\Work\GitHub\responsive\languages & c:\cygwin64\bin\bash -c
>> \cygdrive\i\Work\GitHub\responsive\languages\potomo.sh
>> and this file.
>> https://gist.github.com/grappler/6704735
>
> First of all, don't http://cygwin.com/acronyms/#TOFU
> Just don't.
> Second, I don't see, why you waste time starting bash manually.
>
>
> --
> WBR,
> Andrey Repin (anrdaemon@yandex.ru) 26.09.2013, <01:32>
>
> Sorry for my terrible english...
>

--
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