<commit_before>#!/bin/sh
# isicount: count how many ISI Flat File records
# usage: isicount file1.isi file2.isi
# (tip: save all your ISI exports with .isi for an extension and then do isicount *.isi)
# This is useful for simple integrity checks.

# records are ended by a single code "ER" on a line by itself.
# if we count those we count how many complete records we have.
egrep "^ER" $@ | wc -l<commit_msg>Oops. bash bugfix for spaces in filenames.<commit_after>#!/bin/sh
# isicount: count how many ISI Flat File records
# usage: isicount file1.isi file2.isi
# (tip: save all your ISI exports with .isi for an extension and then do isicount *.isi)
# This is useful for simple integrity checks.

# records are ended by a single code "ER" on a line by itself.
# if we count those we count how many complete records we have.
egrep "^ER" "$@" | wc -l
{'fraction_non_alphanumeric': 0.08716136631330977, 'fraction_numerical': 0.004711425206124852, 'mean_word_length': 3.857142857142857, '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': '3159293', 'n_tokens_mistral': 272, 'n_tokens_neox': 260, 'n_words': 135}