Running an application from the (unix) command line
Tue Jan 24 11:08:06 CET 2006
you could try this;
$ time erl -boot start_clean -noshell -s echo echo foo -s erlang halt
Thomas Johnsson wrote:
> Pupeno wrote:
>> On Monday 23 January 2006 05:36, Gunilla Arendt wrote:
>>> Snip from erl(1):
>>> "-s Mod [Func [Arg1, Arg2, ...]]
>>> Makes init call the specified function. Func defaults to start. If no
>>> arguments are provided, the function is assumed to be of arity 0.
>>> Otherwise it is assumed to be of arity 1, taking the list
>>> [Arg1,Arg2,...] as argument."
>>> Thus "erl -s application start myapp" will result in a call to
>>> "application:start([myapp])" instead of the desired
>> This doesn't work, I don't know why but what I see is that my
>> parameters get totally ignored.
> That's strange. With
> echo(A) ->
> and run with
> erl -noshell -s echo echo abc 123 -s init stop
> I get
> written on standard out (plus some junk before that). This on Solaris.
> This works on windows too (without getting junk before).
> What os are you using? Perhaps you are expecting to get the function
> value result written on standard out?
> Hope this helps,
> -- Thomas
More information about the erlang-questions