sort-on-feat.sh 615 Bytes
#!/bin/bash

#columns:
#1 id
#2 description 
#3 nodeCount
#4 edgeCount
#5 mentionCount
#6 replyCount
#7 RTCount
#8 innerRTCount
#9 outerRTCount
#10 quoteCount
#11 innerQuoteCount
#12 outerQuoteCount

CORES=16
INPUT_DIR=/data/muntean/edge-features-10-cities-november
#OUTPUT_DIR=/data/muntean/filter-10-cities-november-tweets
#COMMAND="time python filter_tweets_by_city.py"
COLUMN=4

for LINE in `ls $INPUT_DIR/*`
do
        #echo $LINE
	OUTPUT_NAME=`basename $LINE | cut -d'.' -f1`
	#echo $OUTPUT_NAME
	sort -t$'\t' -n -r -k$COLUMN $LINE > $INPUT_DIR/${OUTPUT_NAME}-sorted-col-${COLUMN}.tsv
done
#sem --wait
exit 0