Created
June 18, 2016 07:56
-
-
Save butackle/2e6dcdafd875f8f328d68d7b357f92d1 to your computer and use it in GitHub Desktop.
2016/6/18のシェル芸勉強会の雑メモ
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
sed 's/.. / /' monthly_typhoon | sm2 1 1 2 2 | paste - <(tail -n +2 landing.csv ) | sed 's/,$/,0/' | tr , ' ' | awk '$1!=$3 || $2!=$NF | |
sed 1d landing.csv | awk -F, '{for(i=1;i<=12;i++){a[i]+=$(i+1)}}END{for(k in a){print k" " a[k]"/"NR"="a[k]/NR }}' | sort -n | |
sed 1d landing.csv | awk -F, '{for(i=1;i<=12;i++){if(i==1 || $i != ""){printf $i;if(i>1){printf ":";print $i;break}}}}' | |
awk -F, '{for(i=2;i<=13;i++){if($i>0){print $1,i; next}}}' landing.csv | |
cat monthly_typhoon | grep -v ' 0$' | less | guniq -w4 | sed 's/....//' | awk '{print $1}' | sort | uniq -c | |
sed 1d hittakuri | awk '{print $1;}' | sort | uniq -c | |
cat hittakuri | cut -d" " -f1 | sort | uniq -c | |
cat ShellGeiData/vol.23/OSAKA/population_h27sep | |
cut -d\ -f1 hittakuri | sort | uniq -c | sort -k2,2 | paste - <(sort -k1,1 population_h27sep) | awk '{print $2,sprintf("%f",$1/$4)}' | |
sed 1d hittakuri | awk '{print $1" "$8" "$9" "$10;}' | sort | uniq -c | |
sed 1d hittakuri | awk '{print $1$2$3" "$8$9$10;}' | sort | uniq -d | |
sed 1d hittakuri | awk '{print $7" "$5}' | sort | uniq -c | |
sed 1d hittakuri | awk '{print $7" "$5}' | sort | uniq -c | |
awk '{r[$7]=r[$7]+1;} $5=="既遂"{ s[$7]=s[$7]+1; } END{ for(i in r){ print i " " s[i]/r[i]}}' hittakuri | sort -k2,2rn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment