You can use -eval
option:
$ erl -eval 'io:format("printing ~p~n", [{any, term}]), init:stop()' -noshell
printing {any,term}
Read documentation here: http://www.erlang.org/doc/man/erl.html
And you can use just erlc
to compile files: http://erlang.org/doc/man/erlc.html