Starts/calls Erlang.
Each option flag is described below with its name, type, and meaning.
- -a [Mod [Fun [Args]]]]
-
(Optional.) Applies the specified function and returns the result. Mod must be specified. However, start and [] are assumed for unspecified Fun and Args, respectively. Args is to be in the same format as for erlang:apply/3 in ERTS except only a subset of all terms are allowed. The allowed term types are: list (and string representation of list, that is "example"), tuple, atom and number.
Notice that this flag takes exactly one argument, so quoting can be necessary to group Mod, Fun, and Args in a manner dependent on the behavior of your command shell.
- -address [Hostname:]Port
-
(One of -n, -name, -sname or -address is required.) Hostname is the hostname of the machine that is running the peer node that erl_call shall communicate with. The default hostname is the hostname of the local machine. Port is the port number of the node that erl_call shall communicate with. The -address flag cannot be combined with any of the flags -n, -name, -sname or -s.
The -address flag is typically useful when one wants to call a node that is running on machine without an accessible epmd instance.
- -c Cookie
-
(Optional.) Use this option to specify a certain cookie. If no cookie is specified, the ~/.erlang.cookie file is read and its content is used as cookie. The Erlang node we want to communicate with must have the same cookie.
- -d
-
(Optional.) Debug mode. This causes all I/O to be output to the ~/.erl_call.out.Nodename file, where Nodename is the node name of the Erlang node in question.
- -e
-
(Optional.) Reads a sequence of Erlang expressions, separated by comma (,) and ended with a full stop (.), from stdin until EOF (Control-D). Evaluates the expressions and returns the result from the last expression. Returns {ok,Result} on success.
- -fetch_stdout
-
(Optional.) Executes the code, specified with the -a or -e option, in a new process that has a group leader that forwards all stdout (standard output) data so that it is printed to stdout of the erl_call process. This means that stdout data that are written during the execution of the called code, by the code and by descendant processes, will be forwarded (given that the group leader has not been changed by a call to erlang:group_leader/2).
The printed data is UTF-8 encoded.
This option is only relevant together with the option -a or -e.
See the documentation of the I/O protocol, for more information about the group leader concept.
NoteThis option only works when erl_call is interacting with a node with a version greater or equal to OTP-24.
- -h HiddenName
-
(Optional.) Specifies the name of the hidden node that erl_call represents.
- -m
-
(Optional.) Reads an Erlang module from stdin and compiles it.
- -n Node
-
(One of -n, -name, -sname or -address is required.) Has the same meaning as -name and can still be used for backward compatibility reasons.
- -name Node
-
(One of -n, -name, -sname or -address is required.) Node is the name of the peer node to be started or communicated with. It is assumed that Node is started with erl -name, which means that fully qualified long node names are used. If option -s is specified, an Erlang node will (if necessary) be started with erl -name.
- -no_result_term
-
(Optional.) Do not print the result term. This option is only relevant together with the options -a and -e.
- -q
-
(Optional.) Halts the Erlang node specified with switch -n. This switch overrides switch -s.
- -r
-
(Optional.) Generates a random name of the hidden node that erl_call represents.
- -R
-
(Optional.) Request a dynamic random name, of the hidden node that erl_call represents, from the peer node. Supported since OTP 23. Prefer -R over -r when doing repeated requests toward the same peer node.
- -s
-
(Optional.) Starts a distributed Erlang node if necessary. This means that in a sequence of calls, where '-s' and '-n Node' are constant, only the first call starts the Erlang node. This makes the rest of the communication very fast. This flag is currently only available on Unix-like platforms (Linux, Mac OS X, Solaris, and so on).
- -sname Node
-
(One of -n, -name, -sname or -address is required.) Node is the name of the peer node to be started or communicated with. It is assumed that Node is started with erl -sname, which means that short node names are used. If option -s is specified, an Erlang node is started (if necessary) with erl -sname.
- -timeout Seconds
-
(Optional.) Aborts the erl_call process after the timeout expires. Note that this does not abort commands that have already been started with -a, -e, or similar.
- -v
-
(Optional.) Prints a lot of verbose information. This is only useful for the developer and maintainer of erl_call.
- -x ErlScript
-
(Optional.) Specifies another name of the Erlang startup script to be used. If not specified, the standard erl startup script is used.