1-liner to calculate your orange.ch phone bill

I wrote a 1-liner to calculate my monthly orange.ch phone bill before the final end of month bill arrives.  Goto orange.ch, login and download your unbilled details in csv format.

Change your monthly contractual amount as appropriate.

$ awk -F\; '{x=$6 ; gsub(/"/,"",x); sum +=x } END {printf "Monthly mobile phone bill is : %.2f CHF\n", sum + 65}' invoice.csv

Monthly mobile phone bill is : 104.33 CHF

Aside | This entry was posted in awk and tagged , , , , . Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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