[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: env, -l and command line arguments
From: |
Formbi |
Subject: |
Re: env, -l and command line arguments |
Date: |
Sun, 21 Feb 2021 21:45:36 +0000 |
Hi
> I find it's not easy to understand what you want to do, could you give us an
> example?
I wanted to be able to do something like that:
(unless
(or
(member "-r" (command-line))
(member "--repl" (command-line)))
(begin
(display "foo")
(newline)
(exit)))
And I figured out how to do it (and it's even more portable):
#!/bin/sh
exec guile -l "$0" -- "$@"
!#