Tip of the week: Good old Unix knowledge

Being abroad over the May-day public holidays (in most of Europe), I had to compare some numerics without a spreadsheet at hand (traveling without my main MacBook, …). App Store hipsters would probably be lost, now, but knowing some good old Unix Kong Fu there was help around:

Cut’n paste the values (from an PDF, …) into raw txt files, and setup equations (with sed substitutions) to feed bc:

paste out in | sed ’s/\.//; s,[^0-9], / ,; s/^/100 * /’ | bc > res

And for the prettiness one can also paste together the table columns:

paste in out res

Leave a Reply

You must be logged in to post a comment.