Running an application from the (unix) command line

Thomas Johnsson thomas@REDACTED
Tue Jan 24 10:58:56 CET 2006

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list