Watching the National Debt grow… in your terminal

I was watching this little video and came across the idea that it’d be much cooler to see how fast the debt is actually growing at each iteration (I can’t subtract numbers in the proximity of 1014 every second or so just in my head).

The crazy thing is that US government is piling up about $42,000 of fresh debt every second. It’s like a size of annual gross income for many americans 😦

Here I came with the little script below 🙂


while true; do
curr=`wget --quiet -O - | \
grep debtiv.gif | \
sed -e 's/.*ALT="//' -e 's/".*//' -e 's/\ //g' -e 's/^\\$//'`;
echo -n `date +%d/%m/%Y-%H:%M:%S`" "
echo -n "$"$curr " "
curr=`echo "$curr" | sed -e 's/,//g' -e 's/\..*$//g'`
if [ $prev != 0 -a $curr != 0 ]; then
echo -n "Grown by: $";
expr $curr - $prev;
sleep 1;

All formating for has been prepared by this handy tool

Author: DrCos

Dao-Clinicist, Groovy mon, Sprechstallmeister / Concerns separator / 道可道 非常道 / Disclaimer: all posts are my personal opinion and aren't of my affiliations

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s