Last active
August 4, 2020 21:08
-
-
Save matoken/30914e052d33f33ca1c87ca0ddaee4b9 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Steam検索 | |
# https://store.steampowered.com/search/ | |
# ignore_preferences=1 個人設定に基づいたタイトルの除外の無効化 | |
# https://store.steampowered.com/search/?ignore_preferences=1 | |
# Windowsの検索 | |
# https://store.steampowered.com/search/?ignore_preferences=1&os=win | |
# Mac OS Xの検索 | |
# https://store.steampowered.com/search/?ignore_preferences=1&os=mac | |
# SteamOS + Linuxの検索 | |
# https://store.steampowered.com/search/?ignore_preferences=1&os=linux | |
SERCH="https://store.steampowered.com/search/?ignore_preferences=1&os=" | |
OSTYPE=("all" "win" "mac" "linux") | |
MATCH="results match your search." | |
declare -A COUNT | |
for OS in "${OSTYPE[@]}" | |
do | |
COUNT[$OS]=$(LC_ALL=en_US.UTF-8 w3m -dump "$SERCH$OS" | grep "$MATCH" | cut -f1 -d' ' | tr -d ,) | |
echo $OS,${COUNT[$OS]},$(awk "BEGIN { print ${COUNT[$OS]}/${COUNT[all]}*100 }")% | |
done | |
Author
matoken
commented
Aug 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment