[swift-users] Using Swift for interpreted shell scripts?

Daniel Dunbar daniel_dunbar at apple.com
Wed Dec 16 09:37:11 CST 2015


> On Dec 16, 2015, at 7:21 AM, @lbutlr via swift-users <swift-users at swift.org> wrote:
> 
> On 15 Dec 2015, at 14:12, John Regner <regnerjr at gmail.com> wrote:
>> Check out this talk from Ayaka on just this topic! https://realm.io/news/swift-scripting/
> 
> Thank you, that looks very promising.
> 
> I didn’t realize the list was set to “reply off list” so a message I thought I posted didn’t go through. Rather than repost it…
> 
> On Dec 15, 2015, at 12:59 PM, David Turnbull <dturnbull at gmail.com> wrote:
>> There's this shebang for OS X:
>> #!/usr/bin/env xcrun swift
> 
> Interesting. I was just messing around with
> 
> #!/usr/bin/swift
> 
> And making some (albeit slow) progress.
> 
> ===
> 
> Is there a reason to use xcrun instead of calling swift directly?

Probably not. You can just call `swift` and it will shim through to the same thing as `xcrun swift`.

IIRC, 10.9 didn't have the `swift` shim, but every OS X release since then has.

 - Daniel

> 
> -- 
> 'But you ain't part of it, are you?' said Granny conversationally. 'You
> try, but you always find yourself watchin' yourself watchin' people, eh?
> Never quite believin' anything? Thinkin' the wrong thoughts?'
> 
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users



More information about the swift-users mailing list