The “Scripts” folder is temporarily moved out of "Tests" because it doesn't work with the Swift Package Manager.
11 lines
239 B
Swift
Executable File
11 lines
239 B
Swift
Executable File
#!/usr/bin/env swiftshell
|
|
|
|
import SwiftShell
|
|
|
|
main.stdin.lines()
|
|
.enumerated().map { (linenr,line) in String(linenr+1) + ": " + String(line) }
|
|
.joined(separator: "\n").write(to: &main.stdout)
|
|
|
|
// add a final newline at the end
|
|
print("")
|