From f0c0ccc012ddd4b7f4be6286ce30fbae8ffacb75 Mon Sep 17 00:00:00 2001 From: venomade Date: Mon, 26 Oct 2026 11:26:11 +0000 Subject: [PATCH] Add repeatable calculator startup script --- README.md | 3 ++- run.sh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 run.sh diff --git a/README.md b/README.md index 14e01a7..23ffabe 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,11 @@ It will run on `Python 3` via the `calculator.py` script. Add, subtract, multiply and divide two numbers; display the result. ## How to Run It -Run: `python3 calculator.py` +Run: `./run.sh` ## Usage - First enter a number - Then enter an operator (`+`,`-`,`*` or `/`) - Lastly enter a second number - Read the result, printed as `Result: ` followed by the answer. +- When done stop with `Ctrl+c` diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..1824278 --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -e +cd -- "$(dirname -- "$0")" +python3 calculator.py