escript, flags to script

Bengt Kleberg qtxkleb@REDACTED
Fri Mar 23 15:59:47 CET 2001


Greetings,

How do I get escript to recognise Unix style command line flags?

Given my-script (far) below, started like this:
; my-script -a hello

I would like an output of:
cmd-line-args -a hello

but I get:
cmd-line-args []


my-script:

#!/usr/bin/env escript 

main(X) ->
		io:format("cmd-line-args ~p~n",[X]),
		erlang:halt().


% Bengt Kleberg





More information about the erlang-questions mailing list