[erlang-questions] nl(module) in -eval
Richard Carlsson
richardc@REDACTED
Mon Dec 8 23:33:39 CET 2008
Sten Kvamme wrote:
> Hi,
> Trying to use hot code loading from command line, but nl() does not seem
> to work in eval, or what am I doing wrong?
>
> erl -setcookie SFEWRG34AFDSGAFG35235 -name moko2@REDACTED -eval
> "net_adm:ping('neo@REDACTED'),nl(antenna)."
>
> And this is the error printout:
> {"init terminating in
> do_boot",{undef,[{erl_eval,nl,1},{erl_eval,expr,3}]}}
The -eval flag does not use the Erlang shell to execute the commands
(it uses erl_eval directly), so it knows nothing about shell builtins
such as nl(Mod). However, those functions can be found in the module
shell_default, so shell_default:nl(Mod) should work for you.
/Richard
More information about the erlang-questions
mailing list