Calling a function from command line

Michael McDaniel erlang@REDACTED
Sat Mar 4 08:00:33 CET 2006


On Sat, Mar 04, 2006 at 03:05:29AM -0300, Pupeno wrote:
> Hello,
> I am making a kind of script that generates documentation using edoc.
> I need to call edoc:files(["my", "list", "of", "files"], [{so, "me"}, {opt, 
> "ions"}]) but that can't be called from the shell itself, so, is there a 
> better way to do it than:
<znip> 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 using the bash shell

$ export SRC="a.erl b.erl ... n.erl"

$ erl -run edoc files userguide ${SRC} -run erlang halt

$ cat userguide

 % @doc
 % My Whaterver User Guide.
 %
 %<pre>
 %
 % blah blah blah, and config files are a.conf, b.conf
 %
 %
 %</pre>
 %
 % @end
 -module(userguide).


~Michael



More information about the erlang-questions mailing list