Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以这就是我想要的 - 从 bash shell 执行以下迷你脚本:
mnesia:change_table_copy_type(schema, node(), disc_copies).
我试图找出可能性,但找不到明确的答案。有一个“-noshell”选项,或者,“-oldshell”选项,但它们都没有说明如何执行上述任何命令。
我怎么做?
您可以为此使用-noshellwith 。-eval "mnesia:change_table_copy_type(schema, node(), disc_copies)"您还必须-run init stop在此之后通过以确保 Erlang VM 在运行命令后停止,否则即使在评估-eval代码后 VM 仍将继续运行。
-noshell
-eval "mnesia:change_table_copy_type(schema, node(), disc_copies)"
-run init stop
-eval
erl -noshell -eval "mnesia:change_table_copy_type(schema, node(), disc_copies)" -run init stop