Skip to content

Instantly share code, notes, and snippets.

@hyoshiok
Created February 14, 2012 06:55
Show Gist options
  • Save hyoshiok/1824344 to your computer and use it in GitHub Desktop.
Save hyoshiok/1824344 to your computer and use it in GitHub Desktop.
generate a yammer weekly report
#!/bin/bash
#
# generate a yammer weekly report
#
# usage
# $ ./weeklyrep.sh <export_message.csv>
#
# 8/05/2011 hirotaka.yoshioka@mail.rakuten.com
#
CSVFILE=$1
EXEFILE="exe_email_rakuten.txt"
echo 'English/all post'
ruby code_detect.rb $CSVFILE
echo
echo 'Executives Posts'
ruby cut_f.rb 9 $CSVFILE |cut -d@ -f 1|sort|join -1 1 -2 1 - $EXEFILE |wc -l
echo
echo 'Executives Posters'
ruby cut_f.rb 9 $CSVFILE |cut -d@ -f 1|sort|uniq -c|join -1 2 -2 1 - $EXEFILE |cat -n
echo
echo 'Executives Non Posters'
ruby cut_f.rb 9 $CSVFILE |cut -d@ -f 1|sort|uniq |comm -13 - $EXEFILE |cat -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment