BC command not working in CYGWIN
Asked Answered
H

3

7

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

Heterochromatin answered 20/8, 2016 at 13:9 Comment(2)
bc can be installed with the command apt-cyg install bc.Baiel
There might be an alternative in bash shell syntax (I'm not talking old school, like expr, I mean modern bash)? I'm looking to run a list of sums, one per line.Handiness
T
4

You need to select the bc package for installation from the "Select Packages" window.
By default setup installs only base category that is ~ 50 packages, while the full availability is ~ 4000.

https://cygwin.com/packages/x86/bc/bc-1.06.95-2

Tassel answered 21/8, 2016 at 6:43 Comment(0)
F
13

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
Folly answered 14/8, 2017 at 17:53 Comment(0)
T
4

You need to select the bc package for installation from the "Select Packages" window.
By default setup installs only base category that is ~ 50 packages, while the full availability is ~ 4000.

https://cygwin.com/packages/x86/bc/bc-1.06.95-2

Tassel answered 21/8, 2016 at 6:43 Comment(0)
O
0

I believe that bc is not installed by default on Cygwin, and you will need to install it manually. This link might help you.

DISCLAIMER: I have never used Cygwin.

Odericus answered 20/8, 2016 at 15:25 Comment(2)
I have added it in re-installation but it isn't working BTW thank you for your reply and i have already visited that site. :)Heterochromatin
Hmmm... what does which bc say?Odericus

© 2022 - 2024 — McMap. All rights reserved.