On Tue, Dec 22, 2015 at 07:50:49PM -0500, James Gere wrote:
> I think I read somewhere that some shells/implementations require a comment
> character in the shebang.  Gforth Manual I'm certain.

"#!" starts a comment (until the end of the line) in Gforth, and
that's there in order to allow Gforth scripts.  This means that you
have to put a space after #! (allegedly there is at least one Unix
variant that checks for "#! /", so the space is a good idea anyway).

For a .fs script, no additional flags are necessary.  If you call

bla.fs arg1 arg2

and bla.fs starts with

#! /usr/bin/gforth

this is equivalent

/usr/bin/gforth bla.fs arg1 arg2

which is probably what you want.  You can put *one* additional
argument (e.g., a flag) on the #! line; e.g., if you have the
following in bla.fs:

#! /usr/bin/gforth --die-on-signal

then the call abive is equivalent to

/usr/bin/gforth --die-on-signal bla.fs arg1 arg2

- anton

Reply via email to