Sebastian Hungerecker
5/14/2007 5:54:00 AM
Martin DeMello wrote:
> On 5/14/07, xymip <xymip@comcast.net> wrote:
> > In the meantime what is the best way to create a program file and then
> > run it via terminal?
>
> Edit the file with your favourite text editor, save it with a .rb
> extension, then run it from the prompt using ruby <filename> <args>.
Well, if it's a program that you are going to run a lot, I'd suggest
a) saving it without the .rb extension, making it executable via "chmod +x
<filename>" and moving it into a directory in your $PATH or
b) saving it with the .rb extension, making it executalbe and create a symlink
in your $PATH that doesn't have the extension.
Then you can call it via "<programmname> <args>" from anywhere you want.
The latter is what I do.
--
Ist so, weil ist so
Bleibt so, weil war so