golo-lang/golo-lang — pull request #78 by danielpetisme (2013-09-25 13:14:45+00:00)
Title: Add a "script" command to run a file as an anonymous module (no main needed)

The command aims to ease OS operations thanks to golo facilities.

**test.golo**
```
let toList = |this| -> this: split("\n"): asList()
let lines = toList(fileToText("/etc/passwd", "UTF-8"))

let template = gololang.TemplateEngine(): compile("""
<%@params prefix, username%>
<%= prefix %> <%= username %>""")

lines: each( |it| -> println(template(args: get(1), it: split(":"): get(0))))
```
```
golo script --file test.golo --args Hello
```
Output
```
Hello nobody
Hello root
Hello daemon
...
```