[erlang-questions] Re: how do I get the actual list of arguments passed to an escript?

Bengt Kleberg bengt.kleberg@REDACTED
Mon Apr 4 15:46:36 CEST 2011


Greetings,

It could be that it is the unix shell that is interpreting your
arguments for you, before calling erlang. Please try:
~ >./args one two 'three  and four are one argument'


bengt

On Mon, 2011-04-04 at 15:41 +0200, Roberto Ostinelli wrote:
>           ~ >./args one two "three  and four are one argument"
>          Args=["one","two","three","and","four","are","one","argument"]
>         
>         The escript manpage (e.g.
>         http://www.erlang.org/doc/man/escript.html) claims
>         
>          the main/1 function will be called with a list of strings
>          representing the arguments given to the script (not changed
>         or
>          interpreted in any way).
>         
>         which is why I was expecting
>         
>          Args=["one","two","three  and four are one argument"]
>         
>         How can I get the arguments without Erlang changing and
>         interpreting them?
>         
>         Matt
> 
> ./args one two 'three and four are one argument'
> 
> r.
> 




More information about the erlang-questions mailing list