Created
July 7, 2014 04:49
-
-
Save motemen/816ebb5ad76ad7df4ad9 to your computer and use it in GitHub Desktop.
Show today's AdSense earnings using https://github.com/motemen/adsense-report-cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cache_file="$0.cache" | |
if [ -n "$(find $cache_file -mtime -30m)" ]; then | |
cat $cache_file | |
else | |
earnings=$(adsense-report-cli -no-header -from=today | cut -f2) | |
echo "¥ $earnings" | tee $cache_file | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment