When starting a erl shell, we will see a printout as:
Eshell V5.8.4 (abort with ^G)
then, I tried to press Ctrl+G and got:
User switch command
--> ls
Unknown command
--> q().
Unknown command
-->
I can do nothing with the prompt "-->". How to quit from it? and
what's "Ctrl+G" used for?
Thank you!
Barco
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Cheers,
CGS
[1] http://www.erlang.org/doc/man/shell.html
Assume you have an Erlang node named 'server@myhost' running as a
service/daemon on your system. Wouldn't it be great if you could
run interactive commands on this node just like you do in a
shell? JCL let's you do that with ease.
Start up a new shell 'client@myhost' and hit ctrl-G to enter JCL.
Now start a remote shell to 'server@myhost'.
| (client@myhost)1>
| User switch command
| --> r server@myhost
| --> j
| 1* {shell,start,[init]}
| 2 {server@myhost,shell,start,[]}
You now have a local shell with id=1 and a remote shell with
id=2. Connect to the remote shell:
| --> c 2
|
| (server@myhost)1>
Now you have a shell on the server node where you can run any
command you want. This means you can call any exported function
in all modules loaded on the server. That kind of interaction
with a running system can be invaluable when trying to figure out
why it doesn't behave quite the way you planned.
Now of course there is a backside to the story. Doing something
wrong may cause your system to crash. So hey - let's be careful
out there.
/Anders
Such a fabulous facility! Thank-you for telling!
A further question regarding the erlang shell. Can we run an application without running the shell? As I know, to run an erlang app I have to first start the shell and then app:start().
As you said, erlang is more than an OS, so can I understand in the way that an app cannot run when the OS (Eshell) is not started?
Thanks,
Barco
Sent from my HTC