【发布时间】:2014-10-23 00:24:29
【问题描述】:
我想从命令行运行一些小的 Erlang 函数。
例如在 python 中打印日期,我可以使用:
python -c 'import time; print (time.strftime("%d/%m/%Y"))'
我希望能够为 Erlang 提供类似的功能:
erl -s 'date().'
但是,我收到以下错误:
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
{"init terminating in do_boot",{undef,[{'date().',start,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
是否可以从命令行运行小的 Erlang 脚本?
【问题讨论】: