fslasht

watchkb.sh

Jun 15th, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. bp=`curl -s "https://www.google.com/finance/getprices?q=2706&x=TYO&i=10&p=30m&f=d,c,v,o,h,l" | tail -n1 | cut -d ',' -f2`
  4. kp=`curl -s "https://www.google.com/finance/getprices?q=3656&x=TYO&i=10&p=30m&f=d,c,v,o,h,l" | tail -n1 | cut -d ',' -f2`
  5.  
  6. echo "B:$bp K:$kp"
  7.  
  8. # script filename: watchkb.sh
  9.  
  10. # How to use  (watch every 60sec)
  11. # watch -d -n 60 watchkb.sh
  12.  
  13. # use google finance undocumented api. too frequency use to BAN ><
Add Comment
Please, Sign In to add comment