BC command not working in CYGWIN

Sanket Makani picture Sanket Makani · Aug 20, 2016 · Viewed 12.4k times · Source

I have downloaded CygWin(32-bit) and installed (on Windows 7 32 bit System) today to run shell script but i found one problem that bc command isn't working.
I am getting error -bash: bc: command not found. So please help me out!

enter image description here

Answer

mbonness picture mbonness · Aug 14, 2017

On Windows Cygwin, run setup.exe and search for "bc" in the "Math" category, click on it and hit Next to install.

Cygwin Setup

On Unix/Linux you'll probably be needed to install this package Using:

sudo apt install bc