Skip to content

Instantly share code, notes, and snippets.

@chmouel
Created June 6, 2010 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chmouel/427748 to your computer and use it in GitHub Desktop.
Save chmouel/427748 to your computer and use it in GitHub Desktop.
function kilo2pound () { printf "%.2f\n" $(( $1 * 2.20462262 )) }
function pound2kilo () { printf "%.2f\n" $(( $1 / 2.20462262 )) }
function meter2feet () { printf "%.2f\n" $(( $1 * 3.2808399 )) }
function feet2meter () { printf "%.2f feet\n" $(( $1 / 3.2808399 )) }
function kilometer2miles () { printf "%.2f miles\n" $(( $1 * 0.621371192 )) }
function miles2kilometers () { printf "%.2f km\n" $(( $1 / 0.621371192 )) }
function celsius2fareinheit () { printf "%.2f fareinheit\n" $(( ($1 * 9/5) + 32 )) }
function fareinheit2celsius () { printf "%.2f celsius\n" $(( ($1 - 32) * 5/9 )) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment