Native shebang: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
mNo edit summary |
||
Line 894: | Line 894: | ||
Hello, world! |
Hello, world! |
||
</pre> |
</pre> |
||
=={{header|V (Vlang)}}== |
|||
<syntaxhighlight lang="Vlang"> |
|||
$ cat file.v |
|||
#!/usr/local/bin/v run |
|||
println('hello') |
|||
$ chmod 755 file.v |
|||
$ ./file.v |
|||
============ running ./file ============ |
|||
hello |
|||
</syntaxhighlight> |
|||
V also knows to compile & run .vsh files immediately, so you do not need a separate step to compile them. |
|||
An example deploy.vsh: |
|||
<syntaxhighlight lang="Vlang"> |
|||
#!/usr/bin/env -S v |
|||
// Note: The shebang line above, associates the .vsh file to V on Unix-like systems, |
|||
// so it can be run just by specifying the path to the .vsh file... |
|||
</syntaxhighlight> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |