<commit_before>#!/bin/bash

expand_func () {
  dos2unix -n "$1" "$1.tmp"
  mv "$1.tmp" "$1"
}

export -f expand_func

find . -name \*.cs -exec bash -c 'expand_func {}' \;
<commit_msg>fixnewlines.sh no longer attempts to convert binary files<commit_after>#!/bin/bash

expand_func () {
  dos2unix -b -n "$1" "$1.tmp"
  mv "$1.tmp" "$1"
}

export -f expand_func

find . -name \*.cs -exec bash -c 'expand_func {}' \;

{'fraction_non_alphanumeric': 0.19854721549636803, 'fraction_numerical': 0.024213075060532687, 'mean_word_length': 3.099009900990099, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '711442', 'n_tokens_mistral': 180, 'n_tokens_neox': 171, 'n_words': 46}