I can start an Erlang file either via the command line or bash script:
exec erl file.erl
But, I cannot seem to find out how to directly start a function within this file.
e.g.
exec erl file.erl -f function()
Any suggestions appreciated…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
what you probably want is
erl -s module_name function_nameNote that you never specify the erlang file in the erl command like you did there in your example. The Erlang VM loads all modules in the codepath. That includes local directory.
From http://www.erlang.org/doc/man/erl.html: