Skip to content

Instantly share code, notes, and snippets.

@motemen
Created July 7, 2014 04:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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
#!/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