Erlang - Ways to run erlang

erl interactive:
erl
>…

Command:
erl -noshell -s test start -s init stop
%params are passed in as atom list: ['param1', 'param2', 'param3']


Bash script
:
#! /bin/sh
erl -noshell -pa /path/to/my/beam -s hello start -s init stop

(run at Linux OS start up)
HOME=/root # start the “erl” program needs the “HOME” env variable
export HOME
erl -noshell -pa /app/iptracker/ebin -s iptracker_supervisor start -extra /etc/iptracker.conf &

(save as .bat file in Windows)
erl -noshell -pa /path/to/my/beam -s hello start -s init stop

escript:
#! /usr/bin/env escript
main(Params) -> io:format(“Hello world\n”).
% main() is the execution entrance. Params is passed in as list of list ["Param1","Param2","Param3"]