public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
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?
Date: Fri, 02 Feb 2018 19:18:00 -0000	[thread overview]
Message-ID: <87mv0rqjya.fsf@Rainer.invalid> (raw)
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")

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

  parent reply	other threads:[~2018-02-02 19:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02  8:31 Ben via cygwin
2018-02-02  9:17 ` David Allsopp
2018-02-02 16:11 ` Brian Inglis
2018-02-02 19:18 ` Achim Gratz [this message]
2018-02-04 21:05 ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv0rqjya.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).