Bash += and -=: Difference between revisions
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
=Overview= | =Overview= | ||
+= and -= are assignment operators that can be used to increment/decrement the value of the left operand with the value specified after the operator. | += and -= are assignment operators that can be used to increment/decrement the value of the left operand with the value specified after the operator. The operators can be used on integral values as such: | ||
<syntaxhighlight lang='bash'> | |||
</syntaxhighlight> | |||
The += can be used on string values as such: | |||
<syntaxhighlight lang='bash'> | |||
</syntaxhighlight> |
Revision as of 05:31, 8 May 2020
External
Internal
Overview
+= and -= are assignment operators that can be used to increment/decrement the value of the left operand with the value specified after the operator. The operators can be used on integral values as such:
The += can be used on string values as such: