10.40. Bc-1.07.1

The Bc package contains an arbitrary precision numeric processing language.

10.40.1. Installation of Bc

Change an internal script to use sed instead of ed:

cat > bc/fix-libmath_h << "EOF"
#! /bin/bash
sed -e '1   s/^/{"/' \
    -e     's/$/",/' \
    -e '2,$ s/^/"/'  \
    -e   '$ d'       \
    -i libmath.h

sed -e '$ s/$/0}/' \
-i libmath.h
EOF

Prepare Bc for compilation:

./configure \
    --prefix=/usr \
    --with-readline \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info

Compile the package:

make

To test the results, issue:

echo "quit" | ./bc/bc -l Test/checklib.b

Install the package:

make install

10.40.2. Contents of Bc

Installed programs: bc, dc

Short Descriptions

bc

is a command line calculator

dc

is a reverse-polish command line calculator