Browse files

Get my bus times

  • Loading branch information...
1 parent 12899e3 commit 6c17b7a08a7c39f67f622add9bcb1565d745cb21 @dave1010 committed Jul 5, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 bustimes.sh
View
22 bustimes.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+URLS='
+http://nextbuses.mobi/WebView/BusStopSearch/BusStopSearchResults/plegjpa?searchType=route&searchFilter=1C
+http://nextbuses.mobi/WebView/BusStopSearch/BusStopSearchResults/plegjpa?searchType=route&searchFilter=18
+'
+
+echo "Now:" `date +%H:%M:%S`
+
+for URL in $URLS; do
+ echo "$URL:" | sed 's/.*=.*=/Route /'
+ curl -s $URL \
+ | grep '"Stops"' \
+ | grep '[0-9]' \
+ | sed 's/.*;//' \
+ | sed 's/<\/p>//'
+done
+
+
+
+
+

0 comments on commit 6c17b7a

Please sign in to comment.