summaryrefslogblamecommitdiffstats
path: root/shuffle-truncate-all
blob: 5bc7f8c5fbce60a4710e7463fc00a2b6a81ee60b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                 
                                                    
                                                   





                                             
    
#!/bin/bash

COUNTS="$1"
DIR="$2"

if [ -z "$DIR" ]
then
    DIR=.
fi

EVENTS=`awk '{print $1}' $COUNTS`

for E in $EVENTS
do
    CUTOFF=`egrep "^$E " $COUNTS | awk '{print $2}'`
    FILES=`find "$DIR" -iname "*overhead=${E}.bin"`
    if [ -z "$FILES" ]
    then
	echo "[EE] No files for $E."
    else
	shuffle_truncate.py -c $CUTOFF $FILES
    fi
done