X-Recipient: archive-cygwin@delorie.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:from:to:subject:references:date:in-reply-to
	:message-id:mime-version:content-type; q=dns; s=default; b=cCAuv
	+WWNQF5Ks5fhnqWB9jHuxWIgRC4iwZvmCnTVYZBH2mIT3YPM7vmebSWN4xsLHjqA
	Ruqe76UtnlWDK+0yw+YsFeG3RcwtK0o+ZNWhO0hzOPjwJt7KsPJQ5M1aiKABfqSk
	Mw09krKxnjV0aFzoLt7P2qu3r02iOeQzq3WzrI=
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:from:to:subject:references:date:in-reply-to
	:message-id:mime-version:content-type; s=default; bh=SvyFMrssdNv
	2hWw/AAnk8tDolKc=; b=ydfhW/IxMVSlhsJosiKEBIaxqVgYkBpyBwjdXA6U2PV
	Y2YftsIlbZY4pjWjCaRmwt6kNjCtJCxq29bdAB+bYwW6GTK4bTNY+OgYW46CZLHy
	yhk/kyz7O/QmDbJvdSWeh/E7wdR9kLsOXF6kBKv7VUafZRkrJll29F99f84maABw
	=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=dash, intact, Hx-spam-relays-external:ESMTPA
X-HELO: vsmx011.vodafonemail.xion.oxcs.net
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: How to start Cygwin from outside Cygwin and pass a command to execute?
References: <4df6f54b-5898-76f9-ebf6-1a2e40c65aa5@yahoo.co.uk>
Date: Fri, 02 Feb 2018 20:18:21 +0100
In-Reply-To: <4df6f54b-5898-76f9-ebf6-1a2e40c65aa5@yahoo.co.uk> (Ben via	cygwin's message of "Fri, 2 Feb 2018 09:31:31 +0100")
Message-ID: <87mv0rqjya.fsf@Rainer.invalid>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-VADE-STATUS: LEGIT

Ben via cygwin writes:
> Assume I want to call from Windows my CgyWin and pass a command to execute.

That depends a bit on what kind of environment that command expects, but
it could be as easy as invoking it with the full path.  If it needs a
fully set up an environment you need to start a shell (dash or maybe
bash), perhaps in login mode to source your profile.  Lastly if it needs
a tty you'll want to start all that from mintty.

As others have commented, quoting all these commands correctly so they
are intact at the various stages of expansion can be quite an exercise
to get right, so it will be easier if you can wrap these things into a
script that doesn't need any arguments (or at least none that would need
quoting).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

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

