From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84229 invoked by alias); 2 Feb 2018 19:18:32 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 84214 invoked by uid 89); 2 Feb 2018 19:18:31 -0000 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 Received: from vsmx011.vodafonemail.xion.oxcs.net (HELO vsmx011.vodafonemail.xion.oxcs.net) (153.92.174.89) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Feb 2018 19:18:29 +0000 Received: from vsmx003.vodafonemail.xion.oxcs.net (unknown [192.168.75.197]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTP id 760733E0B77 for ; Fri, 2 Feb 2018 19:18:27 +0000 (UTC) Received: from Gertrud (unknown [91.47.49.116]) by mta-7-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 514EC3007FF for ; Fri, 2 Feb 2018 19:18:25 +0000 (UTC) From: Achim Gratz 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 19:18:00 -0000 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 X-SW-Source: 2018-02/txt/msg00015.txt.bz2 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