escript, flags to script

Bengt Kleberg <>
Sun Mar 25 10:54:41 CEST 2001

> From  Fri Mar 23 16:31:36 2001

> Bengt Kleberg <> writes:
> > Greetings,
> > 
> > How do I get escript to recognise Unix style command line flags?
> The problem is that 'erl' is interpreting the args. A possibly
> solution would be to put a leading "escape" character on them so that
> erl never sees anything starting with "-".

...deleted hack

According to the 'erl' manual page it should be possible to stop erl
from interpreting arguments by doing this:

erl -s module function -- any-args

and the use 'init:get_args()' to get 'any-args'.
I thnk I know why nobody has suggested this. It does not work.
But either it should be fixed, or the man page should be updated...

Bengt Kleberg

More information about the erlang-questions mailing list