echo "1 BTC = $(curl -s https://api.coindesk.com/v1/bpi/currentprice/usd.json | grep -o 'rate":"[^"]*' | cut -d\" -f3) USD"
1 BTC
####
#!/usr/bin/perl -w
use strict;
use warnings;
use CGI;
my $query = CGI->new ;
loadPage ();
sub loadPage {
my $page = "";
$page = $query->param("page");
if ($page eq 'search') {
print "Content-Type: text/html\n\n";
print "1 BTC = $(curl -s https://api.coindesk.com/v1/bpi/currentprice/usd.json | grep -o 'rate\":\"[^\"]*' | cut -d\" -f3) USD";
}else {
print "Content-Type: text/html\n\n";
print "error";
}
}
####
1 BTC = 33 33curl -s https://api.coindesk.com/v1/bpi/currentprice/usd.json | grep -o 'rate":"[^"]*' | cut -d" -f3) USD