escript, flags to script

Thierry Mallard <>
Fri Mar 23 16:43:54 CET 2001

On Fri, Mar 23, 2001 at 03:59:47PM +0100, Bengt Kleberg wrote:
> 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 think there is a bug in the parsing of the arguments. Not looked at the
sources yet, but it seems that if there is a "-" in an argument, [] is passed
instead :

tsm|~ > ./testing hello world
cmd-line-args ["hello","world"]

tsm|~ > ./testing hello -a   
cmd-line-args ["hello"]

tsm|~ > ./testing -a world  
cmd-line-args []

Still have to find out why...

Thierry Mallard              |
GnuPG key on | (new)
key 0xA3D021CB               |

More information about the erlang-questions mailing list