diff options
author | Pierre Fenoll <[email protected]> | 2013-12-15 19:32:33 +0000 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2014-01-07 10:08:01 +0100 |
commit | d61aff41862a017b948aeac58a8340ff41e69135 (patch) | |
tree | 29564a01d6e37feb9f4a8b99cc3ecd6edefe5e05 /erts/doc | |
parent | 006df089ffd6c024a4f5099d27ebcda5a684f0ef (diff) | |
download | otp-d61aff41862a017b948aeac58a8340ff41e69135.tar.gz otp-d61aff41862a017b948aeac58a8340ff41e69135.tar.bz2 otp-d61aff41862a017b948aeac58a8340ff41e69135.zip |
Add a chmod call in the CLI example
add missing './'
Diffstat (limited to 'erts/doc')
-rw-r--r-- | erts/doc/src/escript.xml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index 180447cac4..d2b09d4515 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -44,6 +44,7 @@ <p><c>escript</c> runs a script written in Erlang.</p> <p>Here follows an example.</p> <pre> +$ <input>chmod u+x factorial</input> $ <input>cat factorial</input> #!/usr/bin/env escript %% -*- erlang -*- @@ -66,12 +67,13 @@ usage() -> fac(0) -> 1; fac(N) -> N * fac(N-1). -$ <input>factorial 5</input> +$ <input>./factorial 5</input> factorial 5 = 120 -$ <input>factorial</input> +$ <input>./factorial</input> usage: factorial integer -$ <input>factorial five</input> -usage: factorial integer </pre> +$ <input>./factorial five</input> +usage: factorial integer + </pre> <p>The header of the Erlang script in the example differs from a normal Erlang module. The first line is intended to be the interpreter line, which invokes <c>escript</c>. However if you |