cmdfiles
Ulf Wiger
etxuwig@REDACTED
Thu Jan 27 16:10:59 CET 2000
On Thu, 27 Jan 2000, Philip van Gastel (ETM) wrote:
Philip>Hi there,
Philip>
Philip>I am just starting using Erlang because of my work.
Philip>
Philip>
Philip>A very short question, is there a possibility of using
Philip>command files, containing Erlang code and run it from command
Philip>line, eg.
Philip>
Philip># erl <commandfile>
Philip># <Enter>
Philip>
Philip>In this case, I just enter the erl shell, perform the
Philip>commands and exit again.
One way is to use a pipe (assuming UNIX here):
$ echo "erlang:now()." | erl -boot start_clean
Eshell V4.9.1 (abort with ^G)
1> {948,985137,921298}
** Terminating erlang **
Or using erl_call:
# erl_call -s -sname foo -a 'erlang now []'
{948,985627,609986}#
# setenv X `erl_call -sname foo -a 'erlang now []'`
# echo $X
948 985713 596695
# erl_call -sname foo -q
# erl_call -sname foo -a 'erlang now []'
<ERROR> erl_connect failed
erl_call --help for detailed instructions
/Uffe
--
Ulf Wiger, Chief Designer AXD 301 <ulf.wiger@REDACTED>
Ericsson Telecom AB tfn: +46 8 719 81 95
Varuvägen 9, Älvsjö mob: +46 70 519 81 95
S-126 25 Stockholm, Sweden fax: +46 8 719 43 44
More information about the erlang-questions
mailing list