[Top][All Lists]

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

[gforth] Using Gforth with #! "shebang"

From: David Kuehling
Subject: [gforth] Using Gforth with #! "shebang"
Date: Wed, 21 Nov 2012 04:44:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)


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

Attachment: pgp07_V3ljUMx.pgp
Description: PGP signature

reply via email to

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