Hi Keith,

thanks. I did a quick test with the /usr/bin/env approach.

On GNU/Linux (Linux Mint) it seems like the command line options for apl are not passed properly:

eedjsa@server66:~/projects/juergen/apl-1.5/src$ cat x
#! /usr/bin/env apl --script

'ARG:' ⎕ARG

)OFF

eedjsa@server66:~/projects/juergen/apl-1.5/src$ ./x
/usr/bin/env: apl --script: No such file or directory
eedjsa@server66:~/projects/juergen/apl-1.5/src$

If I remove the --script then it works.

However, my statement about the shell's PATH seems to be wrong and will be corrected
in the next  SVN revision.

/// Jürgen


On 02/25/2016 05:57 PM, Keith Thompson wrote:
The GNU APL manual says:

    APL is script-able; a text file whose first line looks like this
    (assuming the APL interpreter binary is called apl and can be
    found in the shell’s PATH):

        #!  apl

    or (if the APL interpreter binary is /mypath/apl but not
    necessarily in the shell’s PATH):

    #!  /mypath/apl

In fact the "#! apl" version will not work on most systems.
The "#!" mechanism doesn't pay attention to $PATH, so you have to
specify the full path to the interpreter.

A common workaround is:

    #!/usr/bin/env apl

I've discussed the pros and cons of that idiom here:

    http://unix.stackexchange.com/a/29620/10454


Reply via email to