Single line shebangs only accept one argument. For more arguments, you need to use multiline shebangs.
On Nov 20, 2012 10:44 PM, "David Kuehling" <
address@hidden> wrote:
Hi,
I just realized that I cannot set dictionary size, stack size etc. when
using Gforth from scripts via #!, as #! on Linux only supports passing
of a single argument to the interpreter:
A file starting with:
#! /usr/local/bin/gforth-fast -m 256M -d 4M -r 4M -l 256k
produces error:
/usr/local/bin/gforth-fast: cannot grok size specification 256M -d 4M -r 4M -l 256K: invalid unit "M -d 4M -r 4M -l 256K"
Any idea how to circumvent that limit in the cleanest way? I don't
really like the idea of having to write a wrapper shell script to make a
forth script work. This works but won't win a price for elegance:
#! /bin/sh
true \ ; exec /usr/local/bin/gforth-fast -m 256M -d 4M -r 4M -l 256k "$0" "$@"
drop
...
cheers,
David
--
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40