5
rated 0 times
[
5]
[
0]
/ answers: 1 / hits: 6943
/ 1 Year ago, sat, november 26, 2022, 4:02:15
Using Ubuntu Desktop, I have terminal open and I am using the bash shell. One of the shell expansions of bash is the arithmetic expansion, with the following syntax:
$(( EXPRESSION ))
or
$[ EXPRESSION ]
When i do arithmetic, it does return the correct value but it is always followed by "command not found":
$ $((1+2))
3: command not found
$ $[1+2]
3: command not found
$ $[2+2]
4: command not found
$ $((2*6))
12: command not found
My question is why does it display "command not found" and how can I fix that?
More From » command-line