<commit_before>#!/usr/bin/env bash
f=$1
cp $f tmp
f=tmp
version=$2


count=`grep -n "//#ifdef $version" $f | wc -l`
echo "Incude count: $count"

withoutinclude=t.js

#for i in {1..$count}
while [ $count -gt 0 ]
do
    echo "Loop $count"
    a=`grep -n "//#ifdef $version" $f | head -n 1 |awk -F: '{print $1}'`
    a=$((a-1))
    #echo "AAA: $a"
    t=`cat $f | wc -l`
    z=`grep -n "//#endif" $f | head -n 1 | awk -F: '{print $1}'`
    echo "Preprocessor from line $a to line $z, total lines: $t"
    x=$((t-z))

    head -n $a $f >  $withoutinclude
    tail -n $x $f >> $withoutinclude
    cp $withoutinclude $f

    count=$(( $count - 1 ))
done


#a=`grep -n "//#ifdef $version" $f | awk -F: '{print $1}'`
<commit_msg>more robust whitespace<commit_after>#!/usr/bin/env bash
f=$1
cp $f tmp
f=tmp
version=$2


count=`grep -n "//#ifdef\s\s*$version" $f | wc -l`
echo "Incude count: $count"

withoutinclude=t.js

#for i in {1..$count}
while [ $count -gt 0 ]
do
    echo "Loop $count"
    a=`grep -n "//#ifdef\s\s*$version" $f | head -n 1 |awk -F: '{print $1}'`
    a=$((a-1))
    #echo "AAA: $a"
    t=`cat $f | wc -l`
    z=`grep -n "//#endif" $f | head -n 1 | awk -F: '{print $1}'`
    echo "Preprocessor from line $a to line $z, total lines: $t"
    x=$((t-z))

    head -n $a $f >  $withoutinclude
    tail -n $x $f >> $withoutinclude
    cp $withoutinclude $f

    count=$(( $count - 1 ))
done


#a=`grep -n "//#ifdef $version" $f | awk -F: '{print $1}'`

{'fraction_non_alphanumeric': 0.22344071281699796, 'fraction_numerical': 0.015078821110349555, 'mean_word_length': 2.5872235872235874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1169841', 'n_tokens_mistral': 664, 'n_tokens_neox': 629, 'n_words': 202}