Skip to content

Instantly share code, notes, and snippets.

@narita1980
Last active November 15, 2020 00:47
Show Gist options
  • Save narita1980/6df2e035e4c99af60cc299567ce3b663 to your computer and use it in GitHub Desktop.
Save narita1980/6df2e035e4c99af60cc299567ce3b663 to your computer and use it in GitHub Desktop.
Zoom集計用のシェル
# Zoomで数字の投票を集計するシェル
# Noをカンマ区切りで記載するとそれぞれの番号がいくつあったのか修正する
# 投票者の名前は投票数1でカウントされるので、本プログラム実行後に手動で削除してください。
$ cat memo.txt
あああああああ
1,2,3
いいいい
2,3,5
いいいい
6,5,1
$ echo "No 投票数"; cat memo.txt | tr ',' '\n' | sort | uniq -c | awk '{print $2 " " $1}'
No 投票数
1 2
2 2
3 2
5 2
6 1
いいいい 2
あああああああ 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment