I've been reading this https://phoenixnap.com/kb/bash-math + other articles which are almost identical to this one and whichever example I try - it doesn't work. It either returns errors or completely wrong results. For instance, in the article
returns 5, but when I try it, it returns "invalid command" or something like that.
I have a GUI calculator but it's very inconvenient for the things I need to calculate, that's why I'm trying to do math in bash. If I can figure it out how it works, I could write a script to make things even easier than the GUI calculator.
Code:
echo $((2+3))
I have a GUI calculator but it's very inconvenient for the things I need to calculate, that's why I'm trying to do math in bash. If I can figure it out how it works, I could write a script to make things even easier than the GUI calculator.