gforth
[Top][All Lists]
Advanced

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

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


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

>>>>> "Andrew" == Andrew Pennebaker <address@hidden> writes:

> Single line shebangs only accept one argument. For more arguments, you
> need to use multiline shebangs.

> http://rosettacode.org/wiki/Multiline_shebang

Cool, so this kind of ugly hack even has a name.  That immediately makes
it more acceptable :).  A more readable multi-line Gforth shebang would
be:

--8<--
#! /bin/sh
#0 [IF] \ lines below read by shell but ignored by Gforth
   exec gforth \
   -m 256M \
   -d 16M \
   "$0" "$@"
[THEN]

.( hello world) CR
BYE
--8<--

cheers,

David
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

Attachment: pgp1iVcl6vl4q.pgp
Description: PGP signature


reply via email to

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