This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calling a program without bash login


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@atlantic.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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]