Jump to content

Native shebang: Difference between revisions

no edit summary
No edit summary
Line 443:
=={{header|Ruby}}==
Ruby does not compile to a binary, thankfully.
 
=={{header|Swift}}==
Using Swift REPL:
 
'''File: echo.swift'''
<lang swift>#!/usr/bin/swift
 
import Foundation
 
print(Process.arguments[1..<Process.arguments.count].joinWithSeparator(" "))
</lang>
 
'''Usage:'''
 
<lang bash>
./echo.swift Hello, world!
</lang>
 
{{Out}}
 
<pre>
Hello, world!
</pre>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.