$ swiftc ldif_to_csv.swift
ldif_to_csv.swift:28:25: error: instance member 'arguments' cannot be used on type 'Process'
var numberOfArguments = Process.arguments.count
^~~~~~~ ~~~~~~~~~
ldif_to_csv.swift:13:16: error: value of type 'String' has no member 'stringByTrimmingCharactersInSet'
return self.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ldif_to_csv.swift:37:5: error: C-style for statement has been removed in Swift 3
for var i = 2; i < numberOfArguments; ++i {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ldif_to_csv.swift:72:17: error: C-style for statement has been removed in Swift 3
for var i = 0; i < ldifLines.count; ++i {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ldif_to_csv.swift:32:24: error: instance member 'arguments' cannot be used on type 'Process'
var ldifFilePath = Process.arguments[1]
^~~~~~~ ~~~~~~~~~
ldif_to_csv.swift:62:23: error: 'NSFileManager' has been renamed to 'FileManager'
var filemgr = NSFileManager.defaultManager()
^~~~~~~~~~~~~
FileManager
Foundation.NSFileManager:2:18: note: 'NSFileManager' was obsoleted in Swift 3
public typealias NSFileManager = FileManager
^
ldif_to_csv.swift:147:33: error: value of type '[String]' has no member 'joinWithSeparator'
csvLines.append(attributesFilter.joinWithSeparator(","))
^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
ldif_to_csv.swift:161:31: error: value of type 'String' has no member 'substringToIndex'
csvLine = csvLine.substringToIndex(csvLine.endIndex.predecessor())
^~~~~~~ ~~~~~~~~~~~~~~~~
ldif_to_csv.swift:165:21: error: value of type '[String]' has no member 'joinWithSeparator'
try csvLines.joinWithSeparator("\n").writeToFile(csvFilePath, atomically: true, encoding: NSUTF8StringEncoding)
^~~~~~~~ ~~~~~~~~~~~~~~~~~