Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bpelson

macrumors newbie
Original poster
Sep 15, 2017
1
0
I have a geektool script to check bitcoin buy price on coinbase, but it is not working.
curl --silent https://coinbase.com/charts | grep -E '(Buy Price <strong>|><BR)' | sed 's/[^.0-9]*//g' |
Do I need to install additional things to fix it or is my code just wrong? Thanks!
 

jerwin

Suspended
Jun 13, 2015
2,895
4,651
Probably should be in another group. I, for one, don't use a Macbook Air. But I saw your post through "New Posts".

anyway, when debugging shell scripts, it's often a good idea to start with the basics...

Code:
Typhon:~ jeremy$ curl --silent https://coinbase.com/charts 

<html><body>You are being <a href="https://www.coinbase.com/charts">redirected</a>.</body></html>

so, no matter what sed and grep code you use, you're never going to be able to correctly parse the results until you figure out the proper URL.
 
  • Like
Reactions: bpelson
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.