[erlang-questions] How can I turn a working escript into erl-shell?

Sergey A. n39052@REDACTED
Mon Nov 10 17:40:22 CET 2008


Hello.

As I known there are two well-known approaches for writing a comand
line interface for an erlang program: using escript and bash.

I've chose escript as the language for writing my first interface.

I hope it will be useful to see the source for somebody who is writing
escript interface now. It's here:

http://gist.github.com/23516

Now about the question I have. With bash I can turn a working script
into any program just by calling something like:

erl -sname dbg -remsh myapp # <-- this starts the Erlang shell and
tell it to connect to a remote node. After the shell will be closed,
script will continue

Thus, the bash script can be used both as a tool for manipulating a
working Erlang application (you can call rpc:call, or smth like) and
as a tool for opening Erlang shell with all the arguments passed
(which is very useful when debugging. It just make life easy).

Is there any way to open the erlang shell from an escript?

Thanks.

--
Sergey.



More information about the erlang-questions mailing list