This is a simple command-line calculator implemented in Bash. It allows users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.
-
Run the script by executing the following command in your terminal:
./calculator.sh
-
Follow the on-screen instructions to select an operation and enter two numbers.
-
The script will calculate the result and display it on the screen.
-
Additionally, a record of the operation and its result will be saved to a history file named "History_Calculator_file".
- Bash shell / wsl bash.
bc
command-line calculator (usually pre-installed on most Unix-like systems, if not usesudo apt install bc
).
This script is provided under the MIT License.