# Import swift file in script

**URL:** <https://forums.swift.org/t/import-swift-file-in-script/9429>\
**Category:** Pitches\
**Created:** [February 1, 2018, 10:12am UTC](https://forums.swift.org/t/import-swift-file-in-script/9429 "2018-02-01T10:12:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![nick.keets](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nick.keets/32/2023_2.png) [@nick.keets](https://forums.swift.org/u/nick.keets)\
**Post date:** [February 5, 2018, 9:47am UTC](https://forums.swift.org/t/import-swift-file-in-script/9429/6 "2018-02-05T09:47:27Z")

</div>

There was some discussion about this in this thread:

> [@Better integration with UNIX tools](https://forums.swift.org/t/better-integration-with-unix-tools/7094):
>
> Swift is a great shell scripting language except for it's lack of any API to execute UNIX commands. Compare these two shell scripts: 
> 
> > **···**
> >
> > #!/usr/bin/php \<? $files = `find ~/Desktop -name *.png`; foreach (explode("\n", $files) as $file) { &nbsp;&nbsp;// do something with $file } - #!/usr/bin/swift import Foundation let process = Process() process.launchPath = "/usr/bin/find" process.arguments = [ &nbsp;&nbsp;NSString(string:"~/Desktop").expandingTildeInPath, &nbsp;&nbsp;"-n…

In my opinion the most promising development is SPM's (internal) Utility module mentioned in the thread.

---

_[View the full topic](https://forums.swift.org/t/import-swift-file-in-script/9429)._
