Update bash.md (#1917)

* Update bash.md

declare variable as integer, then increment

* Update bash.md

Co-authored-by: Rico Sta. Cruz <rstacruz@users.noreply.github.com>
This commit is contained in:
Sonia Hamilton 2022-12-16 08:05:23 +11:00 committed by GitHub
parent 859d8e4f0b
commit 83017d313e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -637,6 +637,11 @@ $((a + 200)) # Add 200 to $a
$(($RANDOM%200)) # Random number 0..199 $(($RANDOM%200)) # Random number 0..199
``` ```
```bash
declare -i count # Declare as type integer
count+=1 # Increment
```
### Subshells ### Subshells
```bash ```bash