Skip to content

Commit

Permalink
math: allow setting scale=10 env var
Browse files Browse the repository at this point in the history
  • Loading branch information
shawwn committed Jan 27, 2023
1 parent fcee283 commit f1ffdc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion math
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

scale=4 # results will print to the 4th decimal
scale=${scale:-4} # results will print to the 4th decimal
echo "scale=$scale; $@" | bc -l

0 comments on commit f1ffdc3

Please sign in to comment.