Basic Calculator
bc(1) is Basic Calculator, which is also a language. This is the BSD version, as there's also a GPL version.
For interactive use, run
It can be used in place of Python, for simple math problems.
To do calculations per line, type bc -e then insert a basic math problem.
Script executables can be made with calculations to perform. Start each bc script file with:
Unit Conversion
From math/units, there's units(1).
Type
Time/Date
sleep(1) as an egg timer.
From deskutils/peaclock,
date(1) is one everyone's familiar with.
Health
misc/nut is an interactive nutrition tool: nut(1).
Usefulness
These can be convenient, if you want to get a quick answer or desired result by using only your keyboard (without your mouse). Also, this comes with minimal dependencies which can be common on desktop applications. Also, useful for those who don't have a graphical desktop.
Share your uses and examples of working with numbers on command line
Share how you work with numbers on the command line, including with interactive use. Python and Julia use may be included. Short scripts, and purposes for them, is ok too.
bc(1) is Basic Calculator, which is also a language. This is the BSD version, as there's also a GPL version.
For interactive use, run
bc
without arguments. Enter your basic math problems and it will output an answer. Type quit
to exit. Example: 8*13*24/2
1248
quit
It can be used in place of Python, for simple math problems.
To do calculations per line, type bc -e then insert a basic math problem.
Script executables can be made with calculations to perform. Start each bc script file with:
Code:
#!/usr/bin/bc
Unit Conversion
From math/units, there's units(1).
Type
units
to enter interactive use:- enter quantity, a single space and unit
- enter wanted unit for conversion
ctrl-c
to exit. For units, whole words and proper abbreviations accepted.Time/Date
sleep(1) as an egg timer.
sleep 6m; play /dir/myalarm.mp3 repeat -
cal -3
will show the previous, current and next month.From deskutils/peaclock,
peaclock
will display the time in large numbers on the command line.date(1) is one everyone's familiar with.
Health
misc/nut is an interactive nutrition tool: nut(1).
Usefulness
These can be convenient, if you want to get a quick answer or desired result by using only your keyboard (without your mouse). Also, this comes with minimal dependencies which can be common on desktop applications. Also, useful for those who don't have a graphical desktop.
Share your uses and examples of working with numbers on command line
Share how you work with numbers on the command line, including with interactive use. Python and Julia use may be included. Short scripts, and purposes for them, is ok too.