Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Israel Torres
- # Fri Sep 24 10:44:47 PDT 2010
- # WolframAlpha API Scraper / used to get timespan for crypto challenge 20101008 crypto.israeltorres.org
- ttotl=`curl -s 'http://api.wolframalpha.com/v1/query?input=from+Tue+Sep+14+19%3A00%3A21+PDT+2010+to+Fri+Oct+8+17%3A00+PDT+2010&appid=xxxxx' | grep plaintext -m 2 | sed 's/\<plaintext\>//g' | sed 's/\<\/plaintext\>//g' | grep -v \|`
- tleft=`curl -s 'http://api.wolframalpha.com/v1/query?input=now+to+Fri+Oct+8+17%3A00+PDT+2010&appid=xxxxx' | grep plaintext -m 2 | sed 's/\<plaintext\>//g' | sed 's/\<\/plaintext\>//g' | grep -v \|`
- telap=`curl -s 'http://api.wolframalpha.com/v1/query?input=from+Tue+Sep+14+19%3A00%3A21+PDT+2010+to+now&appid=xxxxx' | grep plaintext -m 2 | sed 's/\<plaintext\>//g' | sed 's/\<\/plaintext\>//g' | grep -v \|`
- echo -e "total time:\t$ttotl"
- echo -e "time remaining:\t$tleft"
- echo -e "time elapsed:\t$telap"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement