Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.2.0.9.2.20030110114531.01e87fd0@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com Date: Fri, 10 Jan 2003 11:53:51 -0800 To: cygwin AT cygwin DOT com From: Randall R Schulz Subject: Re: Calling a program without bash login In-Reply-To: <20030110194016.GA23824@grub.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Travis, You're not giving us much to go on, but here's a better attempt: C:\cygwin\bin\bash -c "exec /usr/local/bin/ruby /home/travis/myprog.rb" However, I don't see why you're involving BASH or any shell at all. If the Ruby interpreter is invoked from a context in which there is no character-stream standard input and output, a console window will be created automatically. You'll only need the BASH if you want the initial point of entry to be a shell script. Since as shown you want to invoke the Ruby interpreter directly, the shell offers little. One reason you might want to do this is if you required environment setup performed within the shell initialization processing. You can create a Windows shortcut or a batch file that will launch Ruby with the appropriate script / program name argument. If you use the shortcut, you can also establish the window size and position, the font used, the colors displayed, etc. I'm not fond of batch scripts, so I don't know if similar flexibilty is available that way. The shortcut approach I favor will allow an arbitrary command invocation, so you can use it with or without an intervening shell invocation. The only thing you'll need to do, at a minimum, is make sure that the Cygwin bin directory is in the PATH so that Windows can find and load the Cygwin1.dll, the common prerequisite of all Cygwin programs. Randall Schulz At 11:40 2003-01-10, 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 -- 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/