escript, flags to script

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

escript, flags to script

Bengt Kleberg-2

> From luke Fri Mar 23 16:31:36 2001

> Bengt Kleberg <qtxkleb> 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


Reply | Threaded
Open this post in threaded view
|

escript, flags to script

Joe Williams-2

> 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...

You're quite right it's very broken :-) *especially* if the any args
has one of the "erlang" flags -s, ... etc.


  /Joe
--
Joe Armstrong,                      
Alteon WebSystems,                     tel:  +46 8-545 550 00
S:t Eriksgatan 44, IV,                 fax:  +46 8-654 70 71
SE-112 32 Stockholm, Sweden            info: www.bluetail.com



Reply | Threaded
Open this post in threaded view
|

escript, flags to script

Joe Williams-2
In reply to this post by Bengt Kleberg-2

  Re: all comments about escript -- I intend to add on-the-fly
compilation and correct command line handling - watch this space :-)



  /Joe
--
Joe Armstrong,                      
Alteon WebSystems,                     tel:  +46 8-545 550 00
S:t Eriksgatan 44, IV,                 fax:  +46 8-654 70 71
SE-112 32 Stockholm, Sweden            info: www.bluetail.com