bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Error in description of "#!" line


From: Juergen Sauermann
Subject: Re: [Bug-apl] Error in description of "#!" line
Date: Thu, 25 Feb 2016 19:43:01 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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:

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

'ARG:' ⎕ARG

)OFF

address@hidden:~/projects/juergen/apl-1.5/src$ ./x
/usr/bin/env: apl --script: No such file or directory
address@hidden:~/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

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