Created
April 6, 2017 05:34
-
-
Save gin135/f22a44b372d5b9e8b413d963aa68ae15 to your computer and use it in GitHub Desktop.
JR関東地方の運行状況を取得するシェル芸
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/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment