delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/10/15:33:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 10 Jan 2003 15:32:19 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Travis Whitton <whitton AT atlantic DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: Calling a program without bash login
In-Reply-To: <20030110194016.GA23824@grub.ath.cx>
Message-ID: <Pine.GSO.4.44.0301101529200.10883-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Fri, 10 Jan 2003, Travis Whitton wrote:

> Hello,
> I have written a rather extensive program using the cygwin build of
> ruby. Ruby is installed in cygwin inside of /usr/local/bin. I'm trying
> to find a way to create a script to invoke my program without it's users
> having to go into a cygwin bash shell and run it. Ideally, it would be
> something as simple as:
>
> C:\cygwin\bin\bash /usr/local/bin/ruby /home/travis/myprog.rb
>
> but obviously that doesn't work. So, can anybody clue me in as to how to
> accomplish this seemingly simple task? I sure would appreciate it!
>
> Thanks in advance,
> Travis Whitton <whitton AT atlantic DOT net>

Travis,

'C:\cygwin\usr\local\bin\ruby /home/travis/myprog.rb' should suffice, but
if you really want to fully reconstruct the environment of a bash shell, try
'C:\cygwin\bin\bash --login -c "exec /usr/local/bin/ruby /home/travis/myprog.rb"'
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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