I have a variable x=7 and I want to echo it plus one, like echo ($x+1) but I\'m getting:
x=7
echo ($x+1)
bash: syntax error near unexpected
You can also use the bc utility:
bc
$ x=3; $ echo "$x+5.5" | bc 8.5