Skip to content

Instantly share code, notes, and snippets.

View libnumafly's full-sized avatar
🤔

Kensei Sakai libnumafly

🤔
View GitHub Profile
@libnumafly
libnumafly / get_jrkanto_status.sh
Last active April 14, 2017 13:11 — forked from gin135/get_jrkanto_status.sh
JR関東地方の運行状況を取得するシェル芸
#!/bin/sh
curl -s http://traininfo.jreast.co.jp/train_info/kanto.aspx |
nkf -Lu |
grep -A 1 'text-tit-xlarge' |
sed '/acess_i/s/.*alt="\([^"]*\)".*/\1/' |
sed 's/<[^>]*>//g' |
tr -d -- '- ' |
awk NF=NF |
xargs -n 2