Linux : arbitrary calculator language

In this series of mini posts I will teach you a Linux lesson every day, it can be command , tricks , how to. The post will cover for beginner to advanced level. Welcome to Linux terminal.

Follow us and start learning Linux today


bc is a command line arithmetic calculator. It is a an arbitrary calculator language which means that it is an interactive calculator programming language. We can use expressions,variable,print,decision make statement etc

print a

A comparison with >,< return 0 if it fails or 1 if it it true, I think that make sense.

We can also use the bc with output statement as follows

echo '100*9'|bc

You may love to learn following Linux commands and tutorials

Published by


A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.