#!/home/ml/313/bin/escript %%% %%% all command line arguments are passed to "main" in one list %%% here I only accept one argument: the file name. %%% %%% erlang:halt stops all processes and quits. %%% %%% make sure to make your script "executable": chmod +x start.erl %%% main([File]) -> io:format("Start processing ~p~n", [File]), master:process_file(File), erlang:halt().