Advertisement
Shnatsel

Floating-point "inline" math in BASH

Apr 13th, 2013
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.14 KB | None | 0 0
  1. fmath() {
  2. # Floating-point "inline" math in BASH with expressions of almost arbitrary length
  3. # I <3 this hack
  4. echo 'scale=7;' "$*" | bc
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement