Re: best Shebang line for executable scripts

2023-08-06 Thread Alexander Burger
On Sun, Aug 06, 2023 at 11:33:32AM +0100, Jason Vas Dias wrote: > Yes, but please mention something about '(script ...) in the > main 'ref' "Invocation" Section. It took me a long time to find! Can you first explain what you are trying to achieve? 'script' in the hashbang line makes no sense to

Re: best Shebang line for executable scripts

2023-08-06 Thread Jason Vas Dias
Yes, but please mention something about '(script ...) in the main 'ref' "Invocation" Section. It took me a long time to find! On 06/08/2023, Alexander Burger wrote: > On Sun, Aug 06, 2023 at 07:20:40AM +0100, Jason Vas Dias wrote: >> Wow ! I've just figured out the best execve(2) Shebang line fo

Re: best Shebang line for executable scripts

2023-08-06 Thread Alexander Burger
On Sun, Aug 06, 2023 at 07:20:40AM +0100, Jason Vas Dias wrote: > Wow ! I've just figured out the best execve(2) Shebang line for pil scripts: > > $ cat myscript.l > #!/usr/bin/pil -script (car (nth (argv) 1)) (nth (argv) 2) Just for the records, note that (car (nth Lst 1)) is the same a

best Shebang line for executable scripts

2023-08-05 Thread Jason Vas Dias
Wow ! I've just figured out the best execve(2) Shebang line for pil scripts: $ cat myscript.l #!/usr/bin/pil -script (car (nth (argv) 1)) (nth (argv) 2) (let (ars (car (rest))) (prinl (car (nth (file) 2)) " ARGS: " (sym ars)) ) (bye) $ chmod +x myscript.l $ ./myscript.l myscript.l A