Last active
July 28, 2017 16:30
-
-
Save greymd/d89a2fd6605771c2273118b047b7b5ae to your computer and use it in GitHub Desktop.
Wikipediaの数の性質を500まで集める
This file contains 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
# スクレイピング | |
seq 500 \ | |
| while read n;do echo "$n"; w3m -dump -cols 999 "https://ja.wikipedia.org/wiki/$n" | sed -n '/性質\[編集\]/,/\[編集\]/p' > "$n" ;done | |
# 最も性質が多い数は。。 | |
seq 500 | while read f; do echo -n "$f "; cat "$f" | grep '•' | grep -c .; done | sort -k2,2n | |
. | |
. | |
. | |
15 30 | |
6 31 | |
1 33 | |
3 33 | |
4 33 | |
2 35 | |
7 36 | |
11 39 | |
5 42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment