Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #By Jean-Baptiste Fleury <jean-baptiste.fleury@epitech.eu>
- if [ -z $1 ]
- then
- echo "USAGE: ./crypto.sh [SYMBOL]"
- exit
- fi
- curl https://api.coinmarketcap.com/v1/ticker/?convert=EUR -s > /tmp/cmc_api.txt
- line=` cat /tmp/cmc_api.txt | grep -n "\"symbol\": \"$1\"" | cut -d: -f1`
- cat /tmp/cmc_api.txt | tail -n +$line | head -n +16 | tr -d \" | tr -d ,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement