Skip to content

Instantly share code, notes, and snippets.

@libnumafly
Forked from gin135/get_jrkanto_status.sh
Last active April 14, 2017 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save libnumafly/7adc1166f3be18ce8d907c9661a654af to your computer and use it in GitHub Desktop.
Save libnumafly/7adc1166f3be18ce8d907c9661a654af to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment