Native shebang: Difference between revisions
Content added Content deleted
(Added Wren) |
|||
Line 872: | Line 872: | ||
<pre> |
<pre> |
||
Hello, world! |
Hello, world! |
||
</pre> |
|||
=={{header|Wren}}== |
|||
Normally, Process.arguments[0] would return the (first) command line argument but here we need to use Process.arguments[1] because the first argument passed to Wren's command line interpreter is ''./native_shebang.wren''. |
|||
<lang ecmascript>#!/bin/wren native_shebang.wren |
|||
import "os" for Process |
|||
System.print(Process.arguments[1])</lang> |
|||
{{out}} |
|||
<pre> |
|||
$ chmod +x native_shebang.wren |
|||
$ ./native_shebang.wren "Hello world!" |
|||
Hello world! |
|||
</pre> |
</pre> |
||