Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 2
    Just for clarity it would be like that : echo 25-5 | bc Commented May 13, 2016 at 9:17
  • For some math problems, you may need to wrap it in quotes, such as echo '0.6 * 12' | bc
    – Goose
    Commented Jan 26, 2017 at 17:09
  • 1
    you might also need to add scale to get floating point precision working i.e. echo "scale=2;557/3672" | bc
    – CpILL
    Commented Oct 29, 2019 at 23:21