[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shebang support...
From: |
Daniel Diaz |
Subject: |
Re: Shebang support... |
Date: |
Thu, 14 Jul 2011 09:26:04 +0200 |
You cannot avoid the gprolog banner using shebang.
The best way to do want you want is to compile a prolog file to native code
using a directive
:- initialization(goal).
goal :-
<<your code goes here>>
In the predicate 'goal' you can use the built-in 'halt' to exit Prolog.
To obtain a small executable you can use the gplc option --min-size
Daniel
Le 13 juil. 2011 à 06:44, Steve641 a écrit :
>
> First, many thanks for the hints on my last post about 'frustrations' - all
> those issues are now resolved.
>
> I have a new one.. :confused:
>
> I've defined the following 'she-bang' on the first line of my script
> (prompted by the new features in 1.4...)
>
> #!gprolog --consult-file
>
> This works, in the sense that, with permissions 700, I can execute the
> script as if it were a compiled executable... but... it also outputs the
> following:
>
>
> GNU Prolog 1.4.0
> By Daniel Diaz
> Copyright (C) 1999-2011 Daniel Diaz
> compiling /home/user/scratch/script.pl for byte code...
> /home/user/scratch/script.pl compiled, 112 lines read - 48126 bytes written,
> 52 ms
>
> This plays havoc when I want to pass the output to another process - such as
> wc, for example, to post-process the results I get from my script. I don't
> have this problem with executables generated by gplc... Is there a way to
> turn off the banner and compilation message?
>
> --
> View this message in context:
> http://old.nabble.com/Shebang-support...-tp32050963p32050963.html
> Sent from the Gnu - Prolog - Users mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/users-prolog
>
> --
> Ce message a ete verifie par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ete trouve.
--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.