Newbie question: Calling a shell script from ruby

That works if foo.sh has “#! /usr/bin/env perl -” (or the not-made-up
equivalent), which is very much highly recommended.

Mike

···

-----Original Message-----
From: GOTO Kentaro [mailto:gotoken@notwork.org]

A simple way is

system("/some/where/foo.sh")

Thanks for helpful supplementation. But why perl for foo.sh? :slight_smile:

– Gotoken

···

At Wed, 25 Sep 2002 09:39:20 +0900, Henderson, Michael D michael.d.henderson@lmco.com wrote:

That works if foo.sh has “#! /usr/bin/env perl -” (or the not-made-up
equivalent), which is very much highly recommended.

Hi,

···

At Wed, 25 Sep 2002 09:51:03 +0900, GOTO Kentaro wrote:

That works if foo.sh has “#! /usr/bin/env perl -” (or the not-made-up
equivalent), which is very much highly recommended.

Thanks for helpful supplementation. But why perl for foo.sh? :slight_smile:

Note that it works on systems support #! by kernel - almost
modern systems, but in elder systems it may be supported by
shell.


Nobu Nakada