shebang - what's the point?

T

Todd Burch

I've written a few hundred scripts now, and not once have I ever coded a
shebang line. I'm writing on both Windows and the Mac (Tiger).

Any time I'm kicking off a script from the Command Prompt or in Terminal
on the Mac, I simply type

ruby <name>.rb

and it works just fine.

So, when it comes down to it, what's the point of the shebang line?

Todd
 
E

Enrique Comba Riepenhausen

I've written a few hundred scripts now, and not once have I ever
coded a
shebang line. I'm writing on both Windows and the Mac (Tiger).

Any time I'm kicking off a script from the Command Prompt or in
Terminal
on the Mac, I simply type

ruby <name>.rb

and it works just fine.

So, when it comes down to it, what's the point of the shebang line?

Todd

Basically so that instead of

ruby <name>.rb

you can write

/<name>.rb

in the shell prompt.

Will only work in *NIX environments though (UNIX, LINUX, BSD, OS X,
Cygwin, etc.)

Cheers,

Enrique Comba Riepenhausen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top