Native shebang: Difference between revisions
Content added Content deleted
mNo edit summary |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 918: | Line 918: | ||
=={{header|Wren}}== |
=={{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''. |
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''. |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">#!/bin/wren native_shebang.wren |
||
import "os" for Process |
import "os" for Process |
||
System.print(Process.arguments[1])</syntaxhighlight> |
System.print(Process.arguments[1])</syntaxhighlight> |