wener
wener

Reputation: 7760

In Bash, How to run expression only, not as command

e.g.

a=0
a=$((a+1))
# But I want to 
$((a++))
# This report 1 is not a command

How can I run this expression only ?

Upvotes: 0

Views: 37

Answers (1)

jordanm
jordanm

Reputation: 34964

Just remove the $:

a=0
((a++))

Upvotes: 4

Related Questions