escript, flags to script

Thierry Mallard thierry@REDACTED
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              | http://vawis.net
GnuPG key on wwwkeys.pgp.net | http://erlang-fr.org (new)
key 0xA3D021CB               | http://worldforge.org




More information about the erlang-questions mailing list