Skip to content

Instantly share code, notes, and snippets.

@konpyu
Last active November 15, 2017 02:38
Show Gist options
  • Select an option

  • Save konpyu/9f1eab78bb19741f12f3aff4ed6dcb40 to your computer and use it in GitHub Desktop.

Select an option

Save konpyu/9f1eab78bb19741f12f3aff4ed6dcb40 to your computer and use it in GitHub Desktop.

Revisions

  1. konpyu revised this gist Oct 22, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bus.sh
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,4 @@ sed -e 's/\ //g'`

    echo $RES

    terminal-notifier -message $RES -sound Basso -title '東急バス' -timeout 5
    terminal-notifier -message $RES -sound Basso -title '東急バス' -timeout 60
  2. konpyu created this gist Oct 22, 2017.
    13 changes: 13 additions & 0 deletions bus.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/bash

    URL="http://tokyu.bus-location.jp/blsys/navi?VID=ldt&EID=nt&FID=&DSMK=2339&FDSN=0&DPMK=5801&PRM=&SCT=2"
    RES=`curl -L $URL | \
    grep 渋谷駅 | \
    sed -e 's/<[^>]*>//g' | \
    sed -e 's/[[:blank:]]//g' | \
    tr -d '\n' | \
    sed -e 's/\&nbsp;//g'`

    echo $RES

    terminal-notifier -message $RES -sound Basso -title '東急バス' -timeout 5