Running an application from the (unix) command line

Pupeno <>
Sat Jan 21 14:58:59 CET 2006


I've read the FAQ and the manual, that is how I know erl -s takes Module 
[Fuction [Arguments]] and that is how I came up with
erl -s application start myapp
on the first place (which you cas nee I mention in my first mail), which 
doesn't work.
Thanks.

On Saturday 21 January 2006 04:53, Matthias Lang wrote:
> Pupeno writes:
>  > Hello,
>  > how do you run an application from the command line ?
>  > erl -s application start myapp
>  > doesn't seem to work.
>
> Try following the instructions in the FAQ exactly:
>   | 5.7. ...run an Erlang program directly from the unix shell?
>   |
>   | To run Erlang programs without running the Erlang shell, we just pass
>   | some more switches to the Erlang virtual machine. Here's hello world
>   | again:
>   |
>   | 	-module(hello).
>   | 	-export([hello_world/0]).
>   |
>   | 	hello_world() ->
>   | 		io:fwrite("hello, world\n").
>   |
>   |
>   | Save this as hello.erl, compile it and run it directly from the unix
>   | (or msdos) command line:
>   |
>   | 	matthias >erl -compile hello
>   | 	matthias >erl -noshell -s hello hello_world -s init stop
>   | 	hello, world
>
> You find the rest of the FAQ at
>
>   http://www.erlang.org/faq/t1.html
>
> and if you want to know the full details of command line passing, this
> part of the manual explains it:
>
>   http://erlang.se/doc/doc-5.4.12/erts-5.4.12/doc/html/erl.html
>
> Matthias

-- 
Pupeno <> (http://pupeno.com)
Vendemos: Camara de fotos rusa ЗЕНИТ ET (ZENIT) con flash ФОТОН: 
http://pupeno.com/vendo/#camara
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060121/d6c61e47/attachment.bin>


More information about the erlang-questions mailing list