Created
November 27, 2010 15:43
Revisions
-
John McDowall created this gist
Nov 27, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ echo "Trains from HYN to GLQ" && curl --silent \ --user-agent "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7" \ --referer "http://ojp.nationalrail.co.uk/en/s/ldbboard/dep/HYN/GLQ/To" \ "http://ojp.nationalrail.co.uk/en/s/ldb/liveTrainsJson?departing=true&liveTrainsFrom=Hyndland&liveTrainsTo=Glasgow+Queen+Street&serviceId=" \ | sed -e 's/[{"&;/"}]/''/g' | sed -e 's/ltbrgt/-''/g' | \ awk '{n=split($0,a,","); for (i=6; i<=n-2; i++) { printf("%s %-25s %-20s\n",a[i+0],a[i+1],a[i+2]); i+=5}}'