by Prolog
packs, in a user specific directory or in a system-wide
directory. See section
2.11.1.5.
2.11.1.1 Using PrologScript
A Prolog source file can be used directly as a Unix program using the
Unix #!
magic start. The Unix #!
magic is
allowed because if the first letter of a Prolog file is #
,
the first line is treated as a comment.12The #
-sign
can be the legal start of a normal Prolog clause. In the unlikely case
this is required, leave the first line blank or add a header comment.
To create a Prolog script, use one of the two alternatives below as
first line. The first can be used to bind a script to a specific Prolog
installation, while the latter uses the default prolog installed in $PATH
.
#!/path/to/swipl #!/usr/bin/env swipl