<commit_before>//
//  CommandLine.swift
//  SwiftPlusPlus
//
//  Created by <NAME> on 1/15/17.
//
//

#if os(Linux)
import Foundation

struct CommandLine {
    static func execute(_ command: String) -> String {
        let BUFSIZE = 1024
        let pp = popen(command, "r")
        var buf = [CChar](repeating: CChar(0), count:BUFSIZE)

        var output = ""
        while fgets(&buf, Int32(BUFSIZE), pp) != nil {
            output += String(cString: buf)
        }
        return output
    }
}
#endif<commit_msg>[BF] Close process after calling command line command<commit_after>//
//  CommandLine.swift
//  SwiftPlusPlus
//
//  Created by <NAME> on 1/15/17.
//
//

#if os(Linux)
import Foundation

struct CommandLine {
    static func execute(_ command: String) -> String {
        let BUFSIZE = 1024
        let pp = popen(command, "r")
        var buf = [CChar](repeating: CChar(0), count:BUFSIZE)

        var output = ""
        while fgets(&buf, Int32(BUFSIZE), pp) != nil {
            output += String(cString: buf)
        }
        pclose(pp)
        return output
    }
}
#endif
{'fraction_non_alphanumeric': 0.13515981735159818, 'fraction_numerical': 0.021917808219178082, 'mean_word_length': 2.15850144092219, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4407211', 'n_tokens_mistral': 377, 'n_tokens_neox': 351, 'n_words': 97}