<commit_before>#! /bin/bash

  outFile=$1
   NCORES=$2
  cmsbase=$3
 macroDir=$4
  slimmer=$5
macroList=$6

cd $cmsbase/src
eval `scram runtime -sh`
cd -

for file in `cat $macroDir/$macroList`
do
    if [ "$file" != "${file/\//}" ]
    then
        making=${file%%/${file##*/}}
        if [ ! -d $making ]
        then
            mkdir -p $making
        fi
    fi
    cp $macroDir/$file $file
done

cp "${outFile%.*}".txt . 

echo "Trying to make $outFile"
echo ""
echo "Using "$NCORES" cores!"

RUNNING=0
NUM=0

./$slimmer compile

OutputBase="lxbatchTmpOutput"
CommandList="ArgsForThisJob.txt"
echo "" > $CommandList

for file in `cat "${outFile%.*}".txt`; do
    echo root://eoscms/$file $OutputBase\_$NUM.root >> $CommandList
done

cat $CommandList | xargs -n2 -P$NCORES ./$slimmer

hadd hadded.root $OutputBase\_*.root

echo ""
echo "Copying to $outFile"

cp hadded.root $outFile
<commit_msg>Fixed argument order.<commit_after>#! /bin/bash

  cmsbase=$1
 macroDir=$2
  outFile=$3
   NCORES=$4
  slimmer=$5
macroList=$6

cd $cmsbase/src
eval `scram runtime -sh`
cd -

for file in `cat $macroDir/$macroList`
do
    if [ "$file" != "${file/\//}" ]
    then
        making=${file%%/${file##*/}}
        if [ ! -d $making ]
        then
            mkdir -p $making
        fi
    fi
    cp $macroDir/$file $file
done

cp "${outFile%.*}".txt . 

echo "Trying to make $outFile"
echo ""
echo "Using "$NCORES" cores!"

RUNNING=0
NUM=0

./$slimmer compile

OutputBase="lxbatchTmpOutput"
CommandList="ArgsForThisJob.txt"
echo "" > $CommandList

for file in `cat "${outFile%.*}".txt`; do
    echo root://eoscms/$file $OutputBase\_$NUM.root >> $CommandList
done

cat $CommandList | xargs -n2 -P$NCORES ./$slimmer

hadd hadded.root $OutputBase\_*.root

echo ""
echo "Copying to $outFile"

cp hadded.root $outFile

{'fraction_non_alphanumeric': 0.16869469026548672, 'fraction_numerical': 0.00995575221238938, 'mean_word_length': 2.984581497797357, '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': '3707750', 'n_tokens_mistral': 701, 'n_tokens_neox': 690, 'n_words': 176}