[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] Using Gforth with #! "shebang"

From: Andrew Pennebaker
Subject: Re: [gforth] Using Gforth with #! "shebang"
Date: Tue, 20 Nov 2012 23:32:36 -0500

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:

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" "$@"


GnuPG public key:
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

reply via email to

[Prev in Thread] Current Thread [Next in Thread]