delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/09/25/17:39:28

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=YwMg7lN
5+JB8Z/MIZ8IaBesdtPJssGYbQ640PBlBm2OO6r0gXYGtDqPooOloHrgoOxW2Ria
2zdSWEhw3KLvHl66M3ayY5GupDrdNKMUtCSjL29zsCkKZuxqqX7WlLvqELhPFL8/
HmYD0OgJE6OvuOm87B/F5apfO0E2QtKb2yyc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=EVDqYTtxMTjhY
Inaersg/Xc3PeU=; b=EPUiF1JKoyTZIoNcX2xvFP1Aw1sbEp2LplP5Co0pDE7mh
CE0AJzCbTYkbrIk88BuwDbBeCsIMVXP6x2Ler84ACPDYoSsz8bhb0Aag311ADzPA
20hM30g73B3vIlkK91BPYeTAWPcFrTjK+52kSuV+bEoDaeOCpnbig1gXzhKLPY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: Yes, score=6.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,FREEMAIL_REPLY,NO_RELAYS,SPAM_SUBJECT autolearn=no version=3.3.2
X-HELO: mail-pd0-f173.google.com
X-Received: by 10.67.4.197 with SMTP id cg5mr1570081pad.10.1380145152813; Wed, 25 Sep 2013 14:39:12 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <1009095134.20130926013417@mtu-net.ru>
References: <CACOaVDt1UgN2X5XkHf4HcGB2gQQqLKD3QcHZiY5gnpeciCarnA AT mail DOT gmail DOT com> <1296293740 DOT 20130925211640 AT mtu-net DOT ru> <CACOaVDt_cpOzE0M3ABtoFk622YUt-wJ5H5onkLfVQ_R5e_03kw AT mail DOT gmail DOT com> <1009095134 DOT 20130926013417 AT mtu-net DOT ru>
From: Ulrich Pogson <grapplerulrich AT gmail DOT com>
Date: Wed, 25 Sep 2013 23:38:52 +0200
Message-ID: <CACOaVDvRpdPQSumLQ8J=q0nOKaM7FsrCQmEetc3zAEPObYYhCg@mail.gmail.com>
Subject: Re: Run bash script in cmd with cygwin
To: Andrey Repin <cygwin AT cygwin DOT com>

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 AT yandex DOT 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
>>>
>>> then your find-poo.sh
>>>
>>> #! /bin/sh
>>> for file in $(find . -name "*.po")
>>>   do msgfmt -o ${file/.po/.mo} $file
>>> done
>
>> Thanks for your help
>
>> 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 AT yandex DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019