Blame view

sort-on-feat.sh 615 Bytes
21df6b3d   Cristina Muntean   added bash scripts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  #!/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
1946858b   Cristina Muntean   rename
18
19
20
  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"
21df6b3d   Cristina Muntean   added bash scripts
21
22
  COLUMN=4
  
1946858b   Cristina Muntean   rename
23
  for LINE in `ls $INPUT_DIR/*`
21df6b3d   Cristina Muntean   added bash scripts
24
25
  do
          #echo $LINE
1946858b   Cristina Muntean   rename
26
27
28
  	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
21df6b3d   Cristina Muntean   added bash scripts
29
  done
1946858b   Cristina Muntean   rename
30
  #sem --wait
21df6b3d   Cristina Muntean   added bash scripts
31
  exit 0