Created
November 23, 2014 13:42
-
-
Save gghatano/d73482b40abdf33f7a37 to your computer and use it in GitHub Desktop.
mコマンドで集計の練習
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## hit ranking | |
cat ./batting_data.csv | | |
mcut f=BAT_ID,H_FL,AB_FL | | |
mselstr f=AB_FL v=T | | |
mchgstr f=AB_FL c=T:1 | | |
mcal c='if(${H_FL}>0, 1, 0)' a=HIT_FL | | |
mcut f=BAT_ID,HIT_FL,AB_FL | | |
msum k=BAT_ID f=HIT_FL:HIT,AB_FL:ATBAT | | |
mselnum f=ATBAT c='[1,]' | | |
mcal c='${HIT}/${ATBAT}' a=AVG | | |
mselnum f=ATBAT c='[4000,]' | | |
msortf f=AVG%nr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment