#! /bin/bash Datapath="../think/separated_data/" Datasets=$(ls $Datapath) # This is all separately against LC, the Strawman echo "key,ties,wins,losses,wins-losses" for File in $Datasets do DataName=$(basename $File .csv) grep -v LC $DataName"/all_aggregate.txt" | grep -v "wins-losses" done